|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConsistentHashFactory<CH extends ConsistentHash>
Factory for ConsistentHash
instances.
Method Summary | |
---|---|
CH |
create(Hash hashFunction,
int numOwners,
int numSegments,
List<Address> members)
Create a new consistent hash instance. |
CH |
rebalance(CH baseCH)
Create a new consistent hash instance, based on an existing instance, but "balanced" according to the implementation's rules. |
CH |
union(CH ch1,
CH ch2)
Creates a union of two compatible ConsistentHashes (use the same hashing function and have the same configuration parameters). |
CH |
updateMembers(CH baseCH,
List<Address> newMembers)
Create a new consistent hash instance, based on an existing instance, but with a new list of members. |
Method Detail |
---|
CH create(Hash hashFunction, int numOwners, int numSegments, List<Address> members)
hashFunction
- The hash function to use on top of the keys' own hashCode()
implementation.numOwners
- The ideal number of owners for each key. The created consistent hash
can have more or less owners, but each key will have at least one owner.numSegments
- Number of hash-space segments. The implementation may round up the number
of segments for performance, or may ignore the parameter altogether.members
- A list of addresses representing the new cache members.CH updateMembers(CH baseCH, List<Address> newMembers)
baseCH
- An existing consistent hash instance, should not be null
newMembers
- A list of addresses representing the new cache members.
ConsistentHash
instance, or baseCH
if the existing instance
does not need any changes.CH rebalance(CH baseCH)
rebalance(rebalance(ch))
must be equivalent to rebalance(ch)
.
baseCH
- An existing consistent hash instance, should not be null
ConsistentHash
instance, or baseCH
if the existing instance
does not need any changes.CH union(CH ch1, CH ch2)
|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |