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 void
coordChanged(Address from, Address to)
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 oursvoid
handleMembershipChange(java.util.Collection<GmsImpl.Request> requests)
void
handleViewChange(View view, Digest digest)
Called by the GMS when a VIEW is received.void
init()
void
join(Address ignored)
void
joinWithStateTransfer(Address ignored)
void
leave()
void
suspect(Address mbr)
void
unsuspect(Address mbr)
Removes previously suspected member from list of currently suspected membersprotected boolean
wouldIBeCoordinator(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:
init
in classServerGmsImpl
- Throws:
java.lang.Exception
-
joinWithStateTransfer
public void joinWithStateTransfer(Address ignored)
- Specified by:
joinWithStateTransfer
in 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:
handleJoinResponse
in 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:
handleMembershipChange
in classGmsImpl
-
handleViewChange
public void handleViewChange(View view, Digest digest)
Description copied from class:ServerGmsImpl
Called by the GMS when a VIEW is received.- Overrides:
handleViewChange
in 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:
coordChanged
in 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.
-
-