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.


Method Index

 o CreateInstance(GMS)
 o HandleJoin(Address)
 o HandleLeave(Address, boolean)
Returns false.
 o HandleMerge(Vector, Vector, long)
Returns immediately.
 o HandleSuspect(Address)
Returns immediately.
 o HandleUpEvent(Event)
 o HandleViewChange(ViewId, Vector)
Install the first view in which we are a member.
 o Join(Address)
Will generate a CONNECT_OK event.
 o Leave(Address)
 o Merge(Vector)
 o Suspect(Address)

Methods

 o CreateInstance
 public static ClientGmsImpl CreateInstance(GMS gms)
 o 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
 o Leave
 public void Leave(Address mbr)
Overrides:
Leave in class GmsImpl
 o Suspect
 public void Suspect(Address mbr)
Overrides:
Suspect in class GmsImpl
 o Merge
 public void Merge(Vector new_mbrs)
Overrides:
Merge in class GmsImpl
 o HandleJoin
 public boolean HandleJoin(Address mbr)
Overrides:
HandleJoin in class GmsImpl
 o HandleLeave
 public void HandleLeave(Address mbr,
                         boolean suspected)
Returns false. Clients don't handle Leave() requests

Overrides:
HandleLeave in class GmsImpl
 o 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
 o 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
 o HandleSuspect
 public void HandleSuspect(Address mbr)
Returns immediately. Clients don't handle Suspect() requests

Overrides:
HandleSuspect in class GmsImpl
 o HandleUpEvent
 public boolean HandleUpEvent(Event evt)
Overrides:
HandleUpEvent in class GmsImpl

All Packages  Class Hierarchy  This Package  Previous  Next  Index