org.jgroups.protocols
Class PING

java.lang.Object
  extended by org.jgroups.stack.Protocol
      extended by org.jgroups.protocols.Discovery
          extended by org.jgroups.protocols.PING
Direct Known Subclasses:
BPING, MPING

public class PING
extends Discovery

The PING protocol retrieves the initial membership by mcasting a discovery request (via the multicast capable transport) to all current cluster members

The responses should allow us to determine the coordinator which we have to contact, e.g. in case we want to join the group. When we are a server (after having received the BECOME_SERVER event), we'll respond to discovery requests with a discovery response.

Author:
Bela Ban

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jgroups.protocols.Discovery
Discovery.Responses
 
Field Summary
 
Fields inherited from class org.jgroups.protocols.Discovery
break_on_coord_rsp, current_coord, force_sending_discovery_rsps, group_addr, is_coord, is_leaving, is_server, local_addr, members, num_discovery_requests, num_initial_members, num_initial_srv_members, ping_responses, return_entire_cache, stagger_timeout, timeout, timer, use_disk_cache, view
 
Fields inherited from class org.jgroups.stack.Protocol
down_prot, ergonomics, id, log, name, stack, stats, up_prot
 
Constructor Summary
PING()
           
 
Method Summary
 java.util.Collection<PhysicalAddress> fetchClusterMembers(java.lang.String cluster_name)
          Grab all current cluster members
 boolean isDynamic()
           
 boolean sendDiscoveryRequestsInParallel()
          Whether or not to send each discovery request on a separate (timer) thread.
 
Methods inherited from class org.jgroups.protocols.Discovery
deserialize, discoveryRequestReceived, down, findAllViews, findAllViewsAsString, findInitialMembers, findInitialMembersAsString, findMembers, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getTimeout, getView, getViewId, handleConnect, handleDisconnect, init, isMergeRunning, providedUpServices, resetStats, sendDiscoveryRequest, sendDiscoveryResponse, sendMcastDiscoveryRequest, serializeWithoutView, setForceSendingDiscoveryRsps, setNumInitialMembers, setTimeout, start, stop, up
 
Methods inherited from class org.jgroups.stack.Protocol
destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, printStats, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PING

public PING()
Method Detail

isDynamic

public boolean isDynamic()
Specified by:
isDynamic in class Discovery

fetchClusterMembers

public java.util.Collection<PhysicalAddress> fetchClusterMembers(java.lang.String cluster_name)
Description copied from class: Discovery
Grab all current cluster members

Specified by:
fetchClusterMembers in class Discovery
Returns:
A list of the cluster members (usually IpAddresses), or null if the transport is multicast-enabled. Returns an empty list if no cluster members could be found.

sendDiscoveryRequestsInParallel

public boolean sendDiscoveryRequestsInParallel()
Description copied from class: Discovery
Whether or not to send each discovery request on a separate (timer) thread. If disabled, a discovery request will be sent to all members fetched by Discovery.fetchClusterMembers(String) sequentially

Specified by:
sendDiscoveryRequestsInParallel in class Discovery


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.