public static class PartitionedHashMap.ArrayBasedConsistentHashFunction<K> extends MembershipListenerAdapter implements PartitionedHashMap.HashFunction<K>
membershipListeners, membershipListenersCache
Constructor and Description |
---|
PartitionedHashMap.ArrayBasedConsistentHashFunction() |
Modifier and Type | Method and Description |
---|---|
void |
block()
Notify membership listeners to temporarily stop sending messages into
a channel.
|
Address |
hash(K key,
List<Address> members)
Defines a hash function to pick the right node from the list of cluster nodes.
|
void |
suspect(Address suspected_mbr)
Notify membership listener that some node was suspected.
|
void |
viewAccepted(View new_view)
Notify membership listener that new view was accepted.
|
addMembershipListener, removeMembershipListener, unblock
public PartitionedHashMap.ArrayBasedConsistentHashFunction()
public Address hash(K key, List<Address> members)
PartitionedHashMap.HashFunction
hash
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)
MembershipListenerAdapter
viewAccepted
in interface MembershipListener
viewAccepted
in class MembershipListenerAdapter
public void suspect(Address suspected_mbr)
MembershipListenerAdapter
suspect
in interface MembershipListener
suspect
in class MembershipListenerAdapter
public void block()
MembershipListenerAdapter
block
in interface MembershipListener
block
in class MembershipListenerAdapter
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.