public class DefaultConsistentHash extends AbstractWheelConsistentHash
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultConsistentHash.Externalizer |
caches, hashFunction, numVirtualNodes, positionKeys, positionValues, tracegroupManager| Constructor and Description |
|---|
DefaultConsistentHash() |
DefaultConsistentHash(Hash hash) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
protected Log |
getLog() |
int |
hashCode() |
boolean |
isKeyLocalToAddress(Address target,
Object key,
int replCount)
Test to see whether a key is mapped to a given address.
|
List<Address> |
locate(Object key,
int replCount)
Locates a key, given a replication count (number of copies).
|
getCaches, getHashIds, getNormalizedHash, getPositionIndex, getPositionsIterator, isVirtualNodesEnabled, primaryLocation, setCaches, setHashFunction, setNumVirtualNodes, toStringgetBackupsForNode, getGrouping, getStateProvidersOnJoin, getStateProvidersOnLeave, locateAll, setGroupManagerpublic DefaultConsistentHash()
public DefaultConsistentHash(Hash hash)
public List<Address> locate(Object key, int replCount)
ConsistentHashkey - key to locatereplCount - replication count (number of copies)ConsistentHash.setCaches(java.util.Set). Should never be null, and should contain replCount elements or the max
number of caches available, whichever is smaller.public boolean isKeyLocalToAddress(Address target, Object key, int replCount)
ConsistentHashisKeyLocalToAddress in interface ConsistentHashisKeyLocalToAddress in class AbstractConsistentHashtarget - address to testkey - key to testreplCount - repl countprotected Log getLog()
getLog in class AbstractWheelConsistentHashCopyright © 2012 JBoss by Red Hat. All Rights Reserved.