org.jgroups.protocols.pbcast
Class CoordGmsImpl
public class CoordGmsImpl
Coordinator role of the Group MemberShip (GMS) protocol. Accepts JOIN and LEAVE requests and emits view changes
accordingly.
- Bela Ban
handleDownEvent , handleJoin , handleJoinResponse , handleLeave , handleLeaveResponse , handleMergeCancelled , handleMergeRequest , handleMergeResponse , handleMergeView , handleSuspect , handleUpEvent , handleViewChange , iWouldBeCoordinator , init , join , leave , merge , start , stop , suspect , unsuspect , wrongMethod |
CoordGmsImpl
public CoordGmsImpl(GMS g)
handleJoin
public JoinRsp handleJoin(Address mbr)
Computes the new view (including the newly joined member) and get the digest from PBCAST.
Returns both in the form of a JoinRsp
- handleJoin in interface GmsImpl
handleJoinResponse
public void handleJoinResponse(JoinRsp join_rsp)
- handleJoinResponse in interface GmsImpl
handleLeave
public void handleLeave(Address mbr,
boolean suspected)
Exclude mbr
from the membership. If suspected
is true, then
this member crashed and therefore is forced to leave, otherwise it is leaving voluntarily.
- handleLeave in interface GmsImpl
handleLeaveResponse
public void handleLeaveResponse()
- handleLeaveResponse in interface GmsImpl
handleMergeCancelled
public void handleMergeCancelled(Object merge_id)
- handleMergeCancelled in interface GmsImpl
handleMergeRequest
public void handleMergeRequest(Address sender,
Object merge_id)
Get the view and digest and send back both (MergeData) in the form of a MERGE_RSP to the sender.
If a merge is already in progress, send back a MergeData with the merge_rejected field set to true.
- handleMergeRequest in interface GmsImpl
handleMergeResponse
public void handleMergeResponse(MergeData data,
Object merge_id)
- handleMergeResponse in interface GmsImpl
handleMergeView
public void handleMergeView(MergeData data,
Object merge_id)
If merge_id != this.merge_id --> discard
Else cast the view/digest to all members of this group.
- handleMergeView in interface GmsImpl
handleSuspect
public void handleSuspect(Address mbr)
- handleSuspect in interface GmsImpl
handleViewChange
public void handleViewChange(View new_view,
Digest digest)
Called by the GMS when a VIEW is received.
- handleViewChange in interface GmsImpl
new_view
- The view to be installeddigest
- If view is a MergeView, digest contains the seqno digest of all members and has to
be set by GMS
leave
public void leave(Address mbr)
The coordinator itself wants to leave the group
- leave in interface GmsImpl
merge
public void merge(Vector other_coords)
Invoked upon receiving a MERGE event from the MERGE layer. Starts the merge protocol.
See description of protocol in DESIGN.
- merge in interface GmsImpl
other_coords
- A list of coordinators (including myself) found by MERGE protocol
stop
public void stop()
- stop in interface GmsImpl
unsuspect
public void unsuspect(Address mbr)
- unsuspect in interface GmsImpl
Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.