public class ClientGmsImpl extends GmsImpl
Join
(called by clients who want to join a certain group, and
ViewChange
which is called by the coordinator that was contacted by this client, to
tell the client what its initial membership is.GmsImpl.Request
限定符和类型 | 字段和说明 |
---|---|
protected Promise<JoinRsp> |
join_promise |
构造器和说明 |
---|
ClientGmsImpl(GMS g) |
限定符和类型 | 方法和说明 |
---|---|
protected boolean |
firstOfAllClients(Address joiner,
Responses rsps)
Handles the case where no coord responses were received.
|
void |
handleJoinResponse(JoinRsp join_rsp) |
void |
init() |
protected boolean |
installViewIfValidJoinRsp(Promise<JoinRsp> join_promise,
boolean block_for_rsp) |
protected boolean |
isJoinResponseValid(JoinRsp rsp) |
void |
join(Address address,
boolean useFlushIfPresent) |
protected void |
joinInternal(Address mbr,
boolean joinWithStateTransfer,
boolean useFlushIfPresent)
Joins this process to a group.
|
void |
joinWithStateTransfer(Address local_addr,
boolean useFlushIfPresent) |
void |
leave(Address mbr) |
protected static java.lang.String |
print(java.util.List<PingData> rsps) |
protected static java.lang.String |
print(Responses rsps) |
handleDigestResponse, handleLeaveResponse, handleMembershipChange, handleMergeCancelled, handleMergeRequest, handleMergeResponse, handleMergeView, handleViewChange, merge, sendMergeRejectedResponse, start, stop, suspect, unsuspect, wrongMethod
public ClientGmsImpl(GMS g)
public void joinWithStateTransfer(Address local_addr, boolean useFlushIfPresent)
joinWithStateTransfer
在类中 GmsImpl
protected void joinInternal(Address mbr, boolean joinWithStateTransfer, boolean useFlushIfPresent)
If successful, impl is changed to an instance of ParticipantGmsImpl. Otherwise, we continue trying to send join() messages to the coordinator, until we succeed (or there is no member in the group. In this case, we create our own singleton group).
When GMS.disable_initial_coord is set to true, then we won't become coordinator on receiving an initial membership of 0, but instead will retry (forever) until we get an initial membership of > 0.
mbr
- Our own address (assigned through SET_LOCAL_ADDRESS)public void handleJoinResponse(JoinRsp join_rsp)
handleJoinResponse
在类中 GmsImpl
protected boolean installViewIfValidJoinRsp(Promise<JoinRsp> join_promise, boolean block_for_rsp)
protected boolean firstOfAllClients(Address joiner, Responses rsps)
protected boolean isJoinResponseValid(JoinRsp rsp)
protected static java.lang.String print(java.util.List<PingData> rsps)
protected static java.lang.String print(Responses rsps)