public static class PartitionedHashMap.ConsistentHashFunction<K> extends MembershipListenerAdapter implements PartitionedHashMap.HashFunction<K>
membershipListeners, membershipListenersCache| Constructor and Description |
|---|
ConsistentHashFunction() |
| Modifier and Type | Method and Description |
|---|---|
Address |
hash(K key,
List<Address> members)
Defines a hash function to pick the right node from the list of cluster nodes.
|
void |
viewAccepted(View new_view)
Notify membership listener that new view was accepted.
|
addMembershipListener, block, removeMembershipListener, suspect, unblockpublic Address hash(K key, List<Address> members)
PartitionedHashMap.HashFunctionhash in interface PartitionedHashMap.HashFunction<K>key - The object to be hashedmembers - The membership. This value can be ignored for example if the hash function keeps
track of the membership itself, e.g. by registering as a membership
listener (PartitionedHashMap.addMembershipListener(org.jgroups.MembershipListener) )public void viewAccepted(View new_view)
MembershipListenerAdapterviewAccepted in interface MembershipListenerviewAccepted in class MembershipListenerAdapterCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.