All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaGroups.JavaStack.Protocols.RpcClientGmsImpl

java.lang.Object
   |
   +----JavaGroups.JavaStack.Protocols.RpcGmsImpl
           |
           +----JavaGroups.JavaStack.Protocols.RpcClientGmsImpl

public class RpcClientGmsImpl
extends RpcGmsImpl
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(RpcGMS)
 o HandleJoin(Address)
 o HandleLeave(Address)
Returns false.
 o HandleMerge(Vector, Vector, long)
Returns immediately.
 o HandleSuspect(Address)
Returns immediately.
 o HandleUpEvent(Event)
 o HandleViewChange(ViewId, Vector)
 o Join(Address)
Will generate a CONNECT_OK event.
 o Leave(Address)
 o Merge(Vector)
 o Suspect(Address)

Methods

 o CreateInstance
 public static RpcClientGmsImpl CreateInstance(RpcGMS 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 RpcParticipantGmsImpl. 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 RpcGmsImpl
 o Leave
 public void Leave(Address mbr)
Overrides:
Leave in class RpcGmsImpl
 o Suspect
 public void Suspect(Address mbr)
Overrides:
Suspect in class RpcGmsImpl
 o Merge
 public void Merge(Vector new_mbrs)
Overrides:
Merge in class RpcGmsImpl
 o HandleJoin
 public JoinRsp HandleJoin(Address mbr)
Overrides:
HandleJoin in class RpcGmsImpl
 o HandleLeave
 public boolean HandleLeave(Address mbr)
Returns false. Clients don't handle Leave() requests

Overrides:
HandleLeave in class RpcGmsImpl
 o HandleViewChange
 public void HandleViewChange(ViewId new_view,
                              Vector mems)
Overrides:
HandleViewChange in class RpcGmsImpl
 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 RpcGmsImpl
 o HandleSuspect
 public void HandleSuspect(Address mbr)
Returns immediately. Clients don't handle Suspect() requests

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

All Packages  Class Hierarchy  This Package  Previous  Next  Index