Class ConsistentHashKeyRegistry<K>
java.lang.Object
org.wildfly.clustering.infinispan.affinity.impl.ConsistentHashKeyRegistry<K>
- All Implemented Interfaces:
KeyRegistry<K>
Registry of queues of keys with affinity to the members of a consistent hash.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionConsistentHashKeyRegistry(org.infinispan.distribution.ch.ConsistentHash hash, Predicate<org.infinispan.remoting.transport.Address> filter, Supplier<BlockingQueue<K>> queueFactory) -
Method Summary
-
Constructor Details
-
ConsistentHashKeyRegistry
public ConsistentHashKeyRegistry(org.infinispan.distribution.ch.ConsistentHash hash, Predicate<org.infinispan.remoting.transport.Address> filter, Supplier<BlockingQueue<K>> queueFactory)
-
-
Method Details
-
getAddresses
Description copied from interface:KeyRegistryReturns the addresses for which pre-generated keys are available.- Specified by:
getAddressesin interfaceKeyRegistry<K>- Returns:
- a set of cluster members
-
getKeys
Description copied from interface:KeyRegistryReturns a queue of pre-generated keys with affinity for the specified address.- Specified by:
getKeysin interfaceKeyRegistry<K>- Parameters:
address- the address of a cluster member.- Returns:
- a queue of pre-generated keys
-