| java.lang.Object org.jgroups.protocols.GmsImpl org.jgroups.protocols.ClientGmsImpl
ClientGmsImpl | public class ClientGmsImpl extends GmsImpl (Code) | | 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.
author: Bela Ban version: $Revision: 1.12.6.1 $ |
view_installation_mutex | final Object view_installation_mutex(Code) | | |
ClientGmsImpl | public ClientGmsImpl(GMS g)(Code) | | |
determineCoord | Address determineCoord(Vector mbrs)(Code) | | The coordinator is determined by a majority vote. If there are an equal number of votes for
more than 1 candidate, we determine the winner randomly.
|
findInitialMembers | void findInitialMembers()(Code) | | Pings initial members. Removes self before returning vector of initial members.
Uses IP multicast or gossiping, depending on parameters.
|
handleLeave | public void handleLeave(Address mbr, boolean suspected)(Code) | | Returns false. Clients don't handle leave() requests
|
handleMerge | public View handleMerge(ViewId other_view, Vector other_members)(Code) | | Returns immediately. Clients don't handle merge() requests
|
handleSuspect | public void handleSuspect(Address mbr)(Code) | | Returns immediately. Clients don't handle suspect() requests
|
handleUpEvent | public boolean handleUpEvent(Event evt)(Code) | | |
handleViewChange | public void handleViewChange(ViewId new_view, Vector mems)(Code) | | Install the first view in which we are a member. This is essentially a confirmation
of our JOIN request (see join() above).
|
join | public void join(Address mbr)(Code) | | 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).
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.
Parameters: mbr - Our own address (assigned through SET_LOCAL_ADDRESS) |
|
|