voldemort.utils
Class ConstantHashFunction

java.lang.Object
  extended by voldemort.utils.ConstantHashFunction
All Implemented Interfaces:
HashFunction

public class ConstantHashFunction
extends java.lang.Object
implements HashFunction

A hash function that always hashes everything to the same value. Useful for testing purposes.


Constructor Summary
ConstantHashFunction(int hashCode)
           
 
Method Summary
 int hash(byte[] key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantHashFunction

public ConstantHashFunction(int hashCode)
Method Detail

hash

public int hash(byte[] key)
Specified by:
hash in interface HashFunction


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu