|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object
|
+--org.javagroups.protocols.pbcast.GmsImpl
|
+--org.javagroups.protocols.pbcast.ClientGmsImpl
Client part of GMS. Whenever a new member wants to join a group, it starts in the CLIENT role.
No multicasts to the group will be received and processed until the member has been joined and
turned into a SERVER (either coordinator or participant, mostly just participant). This class
only implements 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.
| Field Summary |
|---|
| Fields inherited from class org.javagroups.protocols.pbcast.GmsImpl |
|---|
gms |
| Constructor Summary | |
|---|---|
ClientGmsImpl(GMS g)
|
|
| Method Summary | |
|---|---|
JoinRsp |
handleJoin(Address mbr)
|
void |
handleJoinResponse(JoinRsp join_rsp)
|
void |
handleLeave(Address mbr,
boolean suspected)
Returns false. |
void |
handleLeaveResponse()
|
void |
handleSuspect(Address mbr)
Returns immediately. |
boolean |
handleUpEvent(Event evt)
|
void |
handleViewChange(View new_view,
Digest digest)
Does nothing. |
void |
join(Address mbr)
Joins this process to a group. |
void |
leave(Address mbr)
|
void |
suspect(Address mbr)
|
void |
unsuspect(Address mbr)
|
| Methods inherited from class org.javagroups.protocols.pbcast.GmsImpl |
|---|
handleDownEvent, handleMergeCancelled, handleMergeRequest, handleMergeResponse, handleMergeView, init, iWouldBeCoordinator, merge, start, stop, wrongMethod |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ClientGmsImpl(GMS g)
| Method Detail |
public void join(Address mbr)
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.
join in class GmsImplmbr - Our own address (assigned through SET_LOCAL_ADDRESS)public void leave(Address mbr)
leave in class GmsImplpublic void handleJoinResponse(JoinRsp join_rsp)
handleJoinResponse in class GmsImplpublic void handleLeaveResponse()
handleLeaveResponse in class GmsImplpublic void suspect(Address mbr)
suspect in class GmsImplpublic void unsuspect(Address mbr)
unsuspect in class GmsImplpublic JoinRsp handleJoin(Address mbr)
handleJoin in class GmsImpl
public void handleLeave(Address mbr,
boolean suspected)
handleLeave in class GmsImpl
public void handleViewChange(View new_view,
Digest digest)
handleViewChange in class GmsImplpublic void handleSuspect(Address mbr)
handleSuspect in class GmsImplpublic boolean handleUpEvent(Event evt)
handleUpEvent in class GmsImpl
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||