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
-
public class ParticipantGmsImpl extends ServerGmsImpl
- Author:
- Bela Ban
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jgroups.protocols.pbcast.GmsImpl
GmsImpl.Request
-
-
Constructor Summary
Constructors Constructor Description ParticipantGmsImpl(GMS g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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(java.util.Collection<GmsImpl.Request> requests)voidhandleViewChange(View view, Digest digest)Called by the GMS when a VIEW is received.voidinit()voidjoin(Address mbr, boolean useFlushIfPresent)voidjoinWithStateTransfer(Address mbr, boolean useFlushIfPresent)voidleave()voidsuspect(Address mbr)voidunsuspect(Address mbr)Removes previously suspected member from list of currently suspected membersprotected booleanwouldIBeCoordinator(java.util.Collection<Address> leaving_mbrs)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, merge
-
Methods inherited from class org.jgroups.protocols.pbcast.GmsImpl
handleCoordLeave, handleLeaveResponse, sendMergeRejectedResponse, start, stop, wrongMethod
-
-
-
-
Constructor Detail
-
ParticipantGmsImpl
public ParticipantGmsImpl(GMS g)
-
-
Method Detail
-
init
public void init() throws java.lang.Exception- Overrides:
initin classServerGmsImpl- Throws:
java.lang.Exception
-
joinWithStateTransfer
public void joinWithStateTransfer(Address mbr, boolean useFlushIfPresent)
- Specified by:
joinWithStateTransferin classGmsImpl
-
handleJoinResponse
public void handleJoinResponse(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 ours- Overrides:
handleJoinResponsein classGmsImpl
-
unsuspect
public void unsuspect(Address mbr)
Removes previously suspected member from list of currently suspected members
-
handleMembershipChange
public void handleMembershipChange(java.util.Collection<GmsImpl.Request> requests)
- Overrides:
handleMembershipChangein classGmsImpl
-
handleViewChange
public void handleViewChange(View view, Digest digest)
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
protected void coordChanged(Address from, Address to)
- Overrides:
coordChangedin classServerGmsImpl
-
wouldIBeCoordinator
protected boolean wouldIBeCoordinator(java.util.Collection<Address> leaving_mbrs)
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.
-
-