org.javagroups.protocols.pbcast
Class CoordGmsImpl
java.lang.Object
|
+--org.javagroups.protocols.pbcast.GmsImpl
|
+--org.javagroups.protocols.pbcast.CoordGmsImpl
- public class CoordGmsImpl
- extends GmsImpl
Coordinator role of the Group MemberShip (GMS) protocol. Accepts JOIN and LEAVE requests and emits view changes
accordingly.
- Author:
- Bela Ban
Fields inherited from class org.javagroups.protocols.pbcast.GmsImpl |
gms |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CoordGmsImpl
public CoordGmsImpl(GMS g)
join
public void join(Address mbr)
- Overrides:
join
in class GmsImpl
leave
public void leave(Address mbr)
- The coordinator itself wants to leave the group
- Overrides:
leave
in class GmsImpl
handleJoinResponse
public void handleJoinResponse(JoinRsp join_rsp)
- Overrides:
handleJoinResponse
in class GmsImpl
handleLeaveResponse
public void handleLeaveResponse()
- Overrides:
handleLeaveResponse
in class GmsImpl
suspect
public void suspect(Address mbr)
- Overrides:
suspect
in class GmsImpl
unsuspect
public void unsuspect(Address mbr)
- Overrides:
unsuspect
in class GmsImpl
merge
public void merge(java.util.Vector other_coords)
- Invoked upon receiving a MERGE event from the MERGE layer. Starts the merge protocol.
See description of protocol in DESIGN.
- Overrides:
merge
in class GmsImpl
- Parameters:
other_coords
- A list of coordinators (including myself) found by MERGE protocol
handleMergeRequest
public void handleMergeRequest(Address sender,
java.lang.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.
- Overrides:
handleMergeRequest
in class GmsImpl
handleMergeResponse
public void handleMergeResponse(MergeData data,
java.lang.Object merge_id)
- Overrides:
handleMergeResponse
in class GmsImpl
handleMergeView
public void handleMergeView(MergeData data,
java.lang.Object merge_id)
- If merge_id != this.merge_id --> discard
Else cast the view/digest to all members of this group.
- Overrides:
handleMergeView
in class GmsImpl
handleMergeCancelled
public void handleMergeCancelled(java.lang.Object merge_id)
- Overrides:
handleMergeCancelled
in class GmsImpl
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
- Overrides:
handleJoin
in class 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.
- Overrides:
handleLeave
in class GmsImpl
handleViewChange
public void handleViewChange(View new_view,
Digest digest)
- Called by the GMS when a VIEW is received.
- Overrides:
handleViewChange
in class GmsImpl
- Parameters:
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
handleSuspect
public void handleSuspect(Address mbr)
- Overrides:
handleSuspect
in class GmsImpl
handleDownEvent
public boolean handleDownEvent(Event evt)
- Overrides:
handleDownEvent
in class GmsImpl
Copyright © 2001,2002 www.javagroups.com . All Rights Reserved.