| org.jgroups.MembershipListener
All known Subclasses: org.jgroups.demos.QuoteServer, org.jgroups.blocks.RpcDispatcherAnycastServerObject, org.jgroups.tests.RpcDispatcherShunTest, org.jgroups.blocks.DistributedLockManager, org.jgroups.tests.RpcDispatcherBlocking, org.jgroups.demos.Topology, org.jgroups.tests.MessageDispatcherSpeedTest, org.jgroups.demos.ViewDemo, org.jgroups.tests.MessageDispatcherShunTest, org.jgroups.blocks.PullPushShunTest, org.jgroups.blocks.DistributedQueue, org.jgroups.blocks.VotingAdapter, org.jgroups.tests.PerfTest, org.jgroups.tests.RpcDispatcherSpeedTest, org.jgroups.blocks.ReplicatedTree, org.jgroups.blocks.DistributedTree, org.jgroups.tests.HammerListener, org.jgroups.demos.wb.Whiteboard, org.jgroups.demos.QuoteClient, org.jgroups.blocks.DistributedHashtable, org.jgroups.blocks.MembershipListenerAdapter, org.jgroups.blocks.ReplicatedHashtable, org.jgroups.tests.RpcDispatcherMultiplexerTest, org.jgroups.tests.GroupRequestPull, org.jgroups.tests.RpcDispatcherStressTest,
MembershipListener | public interface MembershipListener (Code) | | Allows a listener to be notified when group membership changes.
These callbacks are used in
org.jgroups.blocks.PullPushAdapter .
The MembershipListener interface is similar to the
MessageListener
interface: every time a new view, a suspicion message, or a
block event is received, the corresponding method of the class implementing
MembershipListener will be called.
Oftentimes the only method containing any functionality will be viewAccepted()
which notifies the receiver that a new member has joined the group or that an
existing member has left or crashed.
|
Method Summary | |
void | block() Called (usually by the FLUSH protocol), as an indication that the member should stop sending messages.
Any messages sent after returning from this callback might get blocked by the FLUSH protocol. | void | suspect(Address suspected_mbr) Called whenever a member is suspected of having crashed,
but has not yet been excluded. | void | viewAccepted(View new_view) Called when a change in membership has occurred. |
block | void block()(Code) | | Called (usually by the FLUSH protocol), as an indication that the member should stop sending messages.
Any messages sent after returning from this callback might get blocked by the FLUSH protocol. When the FLUSH
protocol is done, and messages can be sent again, the FLUSH protocol will simply unblock all pending messages.
If a callback for unblocking is desired, implement
org.jgroups.ExtendedMembershipListener.unblock .
Note that block() is the equivalent of reception of a BlockEvent in the pull mode.
|
suspect | void suspect(Address suspected_mbr)(Code) | | Called whenever a member is suspected of having crashed,
but has not yet been excluded.
|
viewAccepted | void viewAccepted(View new_view)(Code) | | Called when a change in membership has occurred.
No long running actions should be done in this callback.
If some long running action needs to be performed, it should be done in a separate thread.
|
|
|