public class UnionConsistentHash extends AbstractConsistentHash
Modifier and Type | Class and Description |
---|---|
static class |
UnionConsistentHash.Externalizer |
groupManager
Constructor and Description |
---|
UnionConsistentHash(ConsistentHash oldCH,
ConsistentHash newCH) |
Modifier and Type | Method and Description |
---|---|
Set<Address> |
getCaches()
Should return a collection of cache addresses in the cluster.
|
List<Integer> |
getHashIds(Address a)
Returns a list of values between 0 and the hash space limit, or hash id,
for a particular address.
|
ConsistentHash |
getNewConsistentHash() |
ConsistentHash |
getOldConsistentHash() |
List<Address> |
locate(Object key,
int replCount)
Locates a key, given a replication count (number of copies).
|
void |
setCaches(Set<Address> caches)
Sets the collection of cache addresses in the cluster.
|
getBackupsForNode, getGrouping, getStateProvidersOnJoin, getStateProvidersOnLeave, isKeyLocalToAddress, locateAll, primaryLocation, setGroupManager, toString
public UnionConsistentHash(ConsistentHash oldCH, ConsistentHash newCH)
public void setCaches(Set<Address> caches)
ConsistentHash
caches
- A set of unique caches in cluster.public Set<Address> getCaches()
ConsistentHash
public List<Address> locate(Object key, int replCount)
ConsistentHash
key
- 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 List<Integer> getHashIds(Address a)
ConsistentHash
public ConsistentHash getNewConsistentHash()
public ConsistentHash getOldConsistentHash()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.