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.
-
CreateInstance(RpcGMS)
-
-
HandleJoin(Address)
-
-
HandleLeave(Address)
- Returns false.
-
HandleMerge(Vector, Vector, long)
- Returns immediately.
-
HandleSuspect(Address)
- Returns immediately.
-
HandleUpEvent(Event)
-
-
HandleViewChange(ViewId, Vector)
-
-
Join(Address)
- Will generate a CONNECT_OK event.
-
Leave(Address)
-
-
Merge(Vector)
-
-
Suspect(Address)
-
CreateInstance
public static RpcClientGmsImpl CreateInstance(RpcGMS 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 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
Leave
public void Leave(Address mbr)
- Overrides:
- Leave in class RpcGmsImpl
Suspect
public void Suspect(Address mbr)
- Overrides:
- Suspect in class RpcGmsImpl
Merge
public void Merge(Vector new_mbrs)
- Overrides:
- Merge in class RpcGmsImpl
HandleJoin
public JoinRsp HandleJoin(Address mbr)
- Overrides:
- HandleJoin in class RpcGmsImpl
HandleLeave
public boolean HandleLeave(Address mbr)
- Returns false. Clients don't handle Leave() requests
- Overrides:
- HandleLeave in class RpcGmsImpl
HandleViewChange
public void HandleViewChange(ViewId new_view,
Vector mems)
- Overrides:
- HandleViewChange in class RpcGmsImpl
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
HandleSuspect
public void HandleSuspect(Address mbr)
- Returns immediately. Clients don't handle Suspect() requests
- Overrides:
- HandleSuspect in class RpcGmsImpl
HandleUpEvent
public boolean HandleUpEvent(Event evt)
- Overrides:
- HandleUpEvent in class RpcGmsImpl
All Packages Class Hierarchy This Package Previous Next Index