Package org.jgroups.protocols.pbcast
Class ParticipantGmsImpl
java.lang.Object
org.jgroups.protocols.pbcast.GmsImpl
org.jgroups.protocols.pbcast.ServerGmsImpl
org.jgroups.protocols.pbcast.ParticipantGmsImpl
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jgroups.protocols.pbcast.GmsImpl
GmsImpl.Request -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcoordChanged(Address from, Address to) voidhandleJoinResponse(JoinRsp join_rsp) In case we get a different JOIN_RSP from a previous JOIN_REQ sent by us (as a client), we simply apply the new view if it is greater than oursvoidhandleMembershipChange(Collection<GmsImpl.Request> requests) voidhandleViewChange(View view, Digest digest) Called by the GMS when a VIEW is received.voidinit()voidvoidjoinWithStateTransfer(Address mbr, boolean useFlushIfPresent) voidleave()voidvoidRemoves previously suspected member from list of currently suspected membersprotected booleanwouldIBeCoordinator(Collection<Address> leaving_mbrs, Collection<Address> suspected_members) Determines whether this member is the new coordinator given a list of suspected members.Methods inherited from class org.jgroups.protocols.pbcast.ServerGmsImpl
handleDigestResponse, handleMergeCancelled, handleMergeRequest, handleMergeResponse, handleMergeView, mergeMethods inherited from class org.jgroups.protocols.pbcast.GmsImpl
handleCoordLeave, handleLeaveResponse, sendMergeRejectedResponse, start, stop, wrongMethod
-
Field Details
-
suspected_mbrs
-
-
Constructor Details
-
ParticipantGmsImpl
-
-
Method Details
-
init
- Overrides:
initin classServerGmsImpl- Throws:
Exception
-
join
-
joinWithStateTransfer
- Specified by:
joinWithStateTransferin classGmsImpl
-
leave
public void leave() -
handleJoinResponse
In case we get a different JOIN_RSP from a previous JOIN_REQ sent by us (as a client), we simply apply the new view if it is greater than ours- Overrides:
handleJoinResponsein classGmsImpl
-
suspect
-
unsuspect
Removes previously suspected member from list of currently suspected members -
handleMembershipChange
- Overrides:
handleMembershipChangein classGmsImpl
-
handleViewChange
Description copied from class:ServerGmsImplCalled by the GMS when a VIEW is received.- Overrides:
handleViewChangein classServerGmsImpl- Parameters:
view- The view to be installeddigest- If view is a MergeView, the digest contains the seqnos of all members and has to be set by GMS
-
coordChanged
- Overrides:
coordChangedin classServerGmsImpl
-
wouldIBeCoordinator
protected boolean wouldIBeCoordinator(Collection<Address> leaving_mbrs, Collection<Address> suspected_members) Determines whether this member is the new coordinator given a list of suspected members. This is computed as follows: the list of currently suspected members (suspected_mbrs) is removed from the current membership. If the first member of the resulting list is equals to the local_addr, then it is true, otherwise false. Example: own address is B, current membership is {A, B, C, D}, suspected members are {A, D}. The resulting list is {B, C}. The first member of {B, C} is B, which is equal to the local_addr. Therefore, true is returned.
-