Package org.jgroups.protocols.pbcast
Class CoordGmsImpl
java.lang.Object
org.jgroups.protocols.pbcast.GmsImpl
org.jgroups.protocols.pbcast.CoordGmsImpl
Coordinator role of the Group MemberShip (GMS) protocol. Accepts JOIN and LEAVE requests and emits view changes
accordingly.
- Author:
- Bela Ban
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jgroups.protocols.pbcast.GmsImpl
GmsImpl.Request
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleDigestResponse
(Address sender, Digest digest) void
void
handleJoinResponse
(JoinRsp join_rsp) void
void
handleMembershipChange
(Collection<GmsImpl.Request> requests) void
handleMergeCancelled
(ViewId merge_id) 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.void
handleMergeResponse
(MergeData data, ViewId merge_id) void
handleMergeView
(MergeData data, ViewId merge_id) If merge_id is not equal to this.merge_id then discard.void
handleViewChange
(View new_view, Digest digest) Called by the GMS when a VIEW is received.void
init()
void
void
void
The coordinator itself wants to leave the groupvoid
Invoked upon receiving a MERGE event from the MERGE layer.void
stop()
void
void
Methods inherited from class org.jgroups.protocols.pbcast.GmsImpl
handleUpEvent, iWouldBeCoordinator, sendMergeRejectedResponse, start, wrongMethod
-
Constructor Details
-
CoordGmsImpl
-
-
Method Details
-
init
-
join
-
joinWithStateTransfer
- Specified by:
joinWithStateTransfer
in classGmsImpl
-
leave
The coordinator itself wants to leave the group -
handleJoinResponse
- Specified by:
handleJoinResponse
in classGmsImpl
-
handleLeaveResponse
public void handleLeaveResponse()- Specified by:
handleLeaveResponse
in classGmsImpl
-
suspect
-
unsuspect
-
merge
Invoked upon receiving a MERGE event from the MERGE layer. Starts the merge protocol. See description of protocol in DESIGN. -
handleMergeRequest
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 classGmsImpl
-
handleMergeResponse
- Overrides:
handleMergeResponse
in classGmsImpl
-
handleDigestResponse
- Overrides:
handleDigestResponse
in classGmsImpl
-
handleMergeView
If merge_id is not equal to this.merge_id then discard. Else cast the view/digest to all members of this group.- Overrides:
handleMergeView
in classGmsImpl
-
handleMergeCancelled
- Overrides:
handleMergeCancelled
in classGmsImpl
-
handleMembershipChange
- Specified by:
handleMembershipChange
in classGmsImpl
-
handleViewChange
Called by the GMS when a VIEW is received.- Specified by:
handleViewChange
in classGmsImpl
- 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
-
handleExit
public void handleExit()- Overrides:
handleExit
in classGmsImpl
-
stop
public void stop()
-