|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jgroups.blocks.MembershipListenerAdapter
public class MembershipListenerAdapter
This class provides multiplexing possibilities for MembershipListener
instances. Usually, we have more than one instance willing to listen to
membership messages. PullPushAdapter
allows only one instance of
MembershipListener
to be registered for message notification. With
help of this class you can overcome this limitation.
Field Summary | |
---|---|
protected java.util.HashSet |
membershipListeners
|
protected MembershipListener[] |
membershipListenersCache
|
Constructor Summary | |
---|---|
MembershipListenerAdapter()
|
Method Summary | |
---|---|
void |
addMembershipListener(MembershipListener listener)
Add membership listener to this adapter. |
void |
block()
Notify membership listeners to temporarily stop sending messages into a channel. |
void |
removeMembershipListener(MembershipListener listener)
Remove membership listener from this adapter. |
void |
suspect(Address suspected_mbr)
Notify membership listener that some node was suspected. |
void |
unblock()
|
void |
viewAccepted(View new_view)
Notify membership listener that new view was accepted. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.util.HashSet membershipListeners
protected MembershipListener[] membershipListenersCache
Constructor Detail |
---|
public MembershipListenerAdapter()
Method Detail |
---|
public void block()
block
in interface MembershipListener
public void unblock()
public void suspect(Address suspected_mbr)
suspect
in interface MembershipListener
public void viewAccepted(View new_view)
viewAccepted
in interface MembershipListener
public void addMembershipListener(MembershipListener listener)
listener
to be notified when membership event is generated.
listener
- instance of MembershipListener
that should be
added to this adapter.public void removeMembershipListener(MembershipListener listener)
listener
from notification when membership event is generated.
listener
- instance of MembershipListener
that should be
removed from this adapter.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |