All Packages Class Hierarchy This Package Previous Next Index
Class JavaGroups.JavaStack.Protocols.ClientGmsImpl
java.lang.Object
|
+----JavaGroups.JavaStack.Protocols.GmsImpl
|
+----JavaGroups.JavaStack.Protocols.ClientGmsImpl
- public class ClientGmsImpl
- extends GmsImpl
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.
-
CreateInstance(GMS)
-
-
HandleJoin(Address)
-
-
HandleLeave(Address, boolean)
- Returns false.
-
HandleMerge(Vector, Vector, long)
- Returns immediately.
-
HandleSuspect(Address)
- Returns immediately.
-
HandleUpEvent(Event)
-
-
HandleViewChange(ViewId, Vector)
- Install the first view in which we are a member.
-
Join(Address)
- Will generate a CONNECT_OK event.
-
Leave(Address)
-
-
Merge(Vector)
-
-
Suspect(Address)
-
CreateInstance
public static ClientGmsImpl CreateInstance(GMS gms)
Join
public void Join(Address mbr)
- Will generate a CONNECT_OK event. Determines the coordinator and sends a unicast
Join() message to it. If successful, we wait for a ViewChange (can time out).
If view change is received, 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).
- Parameters:
- mbr - Our own address (assigned through SET_LOCAL_ADDRESS)
- Overrides:
- Join in class GmsImpl
Leave
public void Leave(Address mbr)
- Overrides:
- Leave in class GmsImpl
Suspect
public void Suspect(Address mbr)
- Overrides:
- Suspect in class GmsImpl
Merge
public void Merge(Vector new_mbrs)
- Overrides:
- Merge in class GmsImpl
HandleJoin
public boolean HandleJoin(Address mbr)
- Overrides:
- HandleJoin in class GmsImpl
HandleLeave
public void HandleLeave(Address mbr,
boolean suspected)
- Returns false. Clients don't handle Leave() requests
- Overrides:
- HandleLeave in class GmsImpl
HandleViewChange
public void HandleViewChange(ViewId new_view,
Vector mems)
- Install the first view in which we are a member. This is essentially a confirmation
of our JOIN request (see Join() above).
- Overrides:
- HandleViewChange in class GmsImpl
HandleMerge
public void HandleMerge(Vector new_mems,
Vector suspects,
long other_ltime)
- Returns immediately. Clients don't handle Merge() requests
- Overrides:
- HandleMerge in class GmsImpl
HandleSuspect
public void HandleSuspect(Address mbr)
- Returns immediately. Clients don't handle Suspect() requests
- Overrides:
- HandleSuspect in class GmsImpl
HandleUpEvent
public boolean HandleUpEvent(Event evt)
- Overrides:
- HandleUpEvent in class GmsImpl
All Packages Class Hierarchy This Package Previous Next Index