Package org.jgroups.blocks
Class ReplCache.ConsistentHashFunction<K>
- java.lang.Object
-
- org.jgroups.blocks.ReplCache.ConsistentHashFunction<K>
-
- All Implemented Interfaces:
ReplCache.HashFunction<K>
public static class ReplCache.ConsistentHashFunction<K> extends java.lang.Object implements ReplCache.HashFunction<K>
-
-
Constructor Summary
Constructors Constructor Description ConsistentHashFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Address>hash(K key, short replication_count)Function that, given a key and a replication count, returns replication_count number of different addresses of nodes.voidinstallNodes(java.util.List<Address> new_nodes)When the topology changes, this method will be called.
-
-
-
Method Detail
-
hash
public java.util.List<Address> hash(K key, short replication_count)
Description copied from interface:ReplCache.HashFunctionFunction that, given a key and a replication count, returns replication_count number of different addresses of nodes.- Specified by:
hashin interfaceReplCache.HashFunction<K>- Returns:
-
installNodes
public void installNodes(java.util.List<Address> new_nodes)
Description copied from interface:ReplCache.HashFunctionWhen the topology changes, this method will be called. Implementations will typically cache the node list- Specified by:
installNodesin interfaceReplCache.HashFunction<K>
-
-