|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object
|
+--org.javagroups.protocols.GmsImpl
|
+--org.javagroups.protocols.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.GmsImpl |
|---|
gms |
| Constructor Summary | |
|---|---|
ClientGmsImpl(GMS g)
|
|
| Method Summary | |
|---|---|
boolean |
handleJoin(Address mbr)
|
void |
handleLeave(Address mbr,
boolean suspected)
Returns false. |
View |
handleMerge(ViewId other_view,
java.util.Vector other_members)
Returns immediately. |
void |
handleSuspect(Address mbr)
Returns immediately. |
boolean |
handleUpEvent(Event evt)
|
void |
handleViewChange(ViewId new_view,
java.util.Vector mems)
Install the first view in which we are a member. |
void |
init()
|
void |
join(Address mbr)
Will generate a CONNECT_OK event. |
void |
leave(Address mbr)
|
void |
merge(java.util.Vector other_coords)
|
void |
suspect(Address mbr)
|
| Methods inherited from class org.javagroups.protocols.GmsImpl |
|---|
handleDownEvent, iWouldBeCoordinator, 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 init()
init in class GmsImplpublic void join(Address mbr)
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 suspect(Address mbr)
suspect in class GmsImplpublic void merge(java.util.Vector other_coords)
merge in class GmsImplpublic boolean handleJoin(Address mbr)
handleJoin in class GmsImpl
public void handleLeave(Address mbr,
boolean suspected)
handleLeave in class GmsImpl
public void handleViewChange(ViewId new_view,
java.util.Vector mems)
handleViewChange in class GmsImpl
public View handleMerge(ViewId other_view,
java.util.Vector other_members)
handleMerge 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 | |||||||||||