org.jgroups.protocols.pbcast

Class 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

Constructor Summary
CoordGmsImpl(GMS g)
Method Summary
voidhandleExit()
voidhandleJoin(Address mbr)
Computes the new view (including the newly joined member) and get the digest from PBCAST.
voidhandleJoinResponse(JoinRsp join_rsp)
voidhandleLeave(Address mbr, boolean suspected)
Exclude mbr from the membership.
voidhandleLeaveResponse()
voidhandleMergeCancelled(ViewId merge_id)
voidhandleMergeRequest(Address sender, ViewId merge_id)
Get the view and digest and send back both (MergeData) in the form of a MERGE_RSP to the sender.
voidhandleMergeResponse(MergeData data, ViewId merge_id)
voidhandleMergeView(MergeData data, ViewId merge_id)
If merge_id is not equal to this.merge_id then discard.
voidhandleSuspect(Address mbr)
voidhandleViewChange(View new_view, Digest digest)
Called by the GMS when a VIEW is received.
voidinit()
voidjoin(Address mbr)
voidleave(Address mbr)
The coordinator itself wants to leave the group
voidmerge(Vector other_coords)
Invoked upon receiving a MERGE event from the MERGE layer.
voidstop()
voidsuspect(Address mbr)
voidunsuspect(Address mbr)

Constructor Detail

CoordGmsImpl

public CoordGmsImpl(GMS g)

Method Detail

handleExit

public void handleExit()

handleJoin

public void 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

handleJoinResponse

public void handleJoinResponse(JoinRsp join_rsp)

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.

handleLeaveResponse

public void handleLeaveResponse()

handleMergeCancelled

public void handleMergeCancelled(ViewId merge_id)

handleMergeRequest

public void handleMergeRequest(Address sender, ViewId 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.

handleMergeResponse

public void handleMergeResponse(MergeData data, ViewId merge_id)

handleMergeView

public void handleMergeView(MergeData data, ViewId merge_id)
If merge_id is not equal to this.merge_id then discard. Else cast the view/digest to all members of this group.

handleSuspect

public void handleSuspect(Address mbr)

handleViewChange

public void handleViewChange(View new_view, Digest digest)
Called by the GMS when a VIEW is received.

Parameters: new_view The view to be installed digest If view is a MergeView, digest contains the seqno digest of all members and has to be set by GMS

init

public void init()

join

public void join(Address mbr)

leave

public void leave(Address mbr)
The coordinator itself wants to leave the group

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.

Parameters: other_coords A list of coordinators (including myself) found by MERGE protocol

stop

public void stop()

suspect

public void suspect(Address mbr)

unsuspect

public void unsuspect(Address mbr)
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.