public class ConsistentHashV1 extends Object implements ConsistentHash
MurmurHash2;| Constructor and Description |
|---|
ConsistentHashV1() |
| Modifier and Type | Method and Description |
|---|---|
int |
getNormalizedHash(Object key) |
SocketAddress |
getServer(byte[] key) |
void |
init(Map<SocketAddress,Set<Integer>> servers2Hash,
int numKeyOwners,
int hashSpace) |
void |
setHash(Hash hash) |
protected Hash hash
public void init(Map<SocketAddress,Set<Integer>> servers2Hash, int numKeyOwners, int hashSpace)
init in interface ConsistentHashpublic SocketAddress getServer(byte[] key)
getServer in interface ConsistentHashpublic void setHash(Hash hash)
public int getNormalizedHash(Object key)
getNormalizedHash in interface ConsistentHashCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.