Package org.jgroups.protocols
Class MULTI_PING
- java.lang.Object
-
- org.jgroups.stack.Protocol
-
- org.jgroups.protocols.Discovery
-
- org.jgroups.protocols.MULTI_PING
-
public class MULTI_PING extends Discovery
Protocol to invoke multiple discovery protocols in the same stack. All discovery protocols needs to be _below_ this one, e.g.<TCP.../> <TCPPING initial_hosts="127.0.0.1[7800]"/> <PING /> <MPING/> <FILE_PING/> <MULTI_PING async_discovery="true"/> <MERGE3 .../> ...
- Since:
- 4.0.8
- Author:
- Bela Ban
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jgroups.protocols.Discovery
Discovery.DiscoveryCacheDisseminationTask
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Discovery>
discovery_protocols
-
Fields inherited from class org.jgroups.protocols.Discovery
async_discovery, async_discovery_use_separate_thread_per_request, break_on_coord_rsp, cluster_name, current_coord, discovery_req_futures, discovery_rsp_callback, discovery_rsp_expiry_time, is_coord, is_leaving, is_server, local_addr, max_members_in_discovery_request, max_rank_to_reply, num_discovery_requests, num_discovery_runs, ping_responses, return_entire_cache, send_cache_on_join, sends_can_block, stagger_timeout, timer, transport, transport_supports_multicasting, use_disk_cache, use_ip_addrs, view, WHITESPACE
-
Fields inherited from class org.jgroups.stack.Protocol
after_creation_hook, down_prot, ergonomics, id, log, stack, stats, up_prot
-
-
Constructor Summary
Constructors Constructor Description MULTI_PING()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
findMembers(java.util.List<Address> members, boolean initial_discovery, Responses responses)
Fetches information (e.g.protected void
findMembers(java.util.List<Address> members, boolean initial_discovery, Responses rsps, boolean async)
java.lang.String
getDiscoveryProtocols()
void
init()
Called after instance has been created (null constructor) and before protocol is started.protected void
invokeFindMembers(java.util.List<Address> members, boolean initial_discovery, Responses rsps, boolean async)
boolean
isDynamic()
void
weedOutCompletedDiscoveryResponses()
Removes responses which are done or whose timeout has expired (in the latter case, an expired response is marked as done)-
Methods inherited from class org.jgroups.protocols.Discovery
addDiscoveryResponseToCaches, addResponse, addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, clearRequestFutures, deserialize, discoveryRequestReceived, discoveryRspExpiryTime, disseminateDiscoveryInformation, down, dumpCache, findInitialMembersAsString, findMembers, getClusterName, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getView, getViewId, handleConnect, handleDisconnect, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, providedUpServices, read, readPingData, resetStats, returnEntireCache, returnEntireCache, sendCacheInformation, sendDiscoveryResponse, serializeWithoutView, setClusterName, staggerTimeout, staggerTimeout, start, startCacheDissemination, stop, up, up, useDiskCache, useDiskCache, write
-
Methods inherited from class org.jgroups.stack.Protocol
accept, afterCreationHook, destroy, down, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, statsEnabled, up
-
-
-
-
Field Detail
-
discovery_protocols
protected final java.util.List<Discovery> discovery_protocols
-
-
Method Detail
-
getDiscoveryProtocols
public java.lang.String getDiscoveryProtocols()
-
init
public void init() throws java.lang.Exception
Description copied from class:Protocol
Called after instance has been created (null constructor) and before protocol is started. Properties are already set. Other protocols are not yet connected and events cannot yet be sent.
-
weedOutCompletedDiscoveryResponses
public void weedOutCompletedDiscoveryResponses()
Description copied from class:Discovery
Removes responses which are done or whose timeout has expired (in the latter case, an expired response is marked as done)- Overrides:
weedOutCompletedDiscoveryResponses
in classDiscovery
-
findMembers
protected void findMembers(java.util.List<Address> members, boolean initial_discovery, Responses responses)
Description copied from class:Discovery
Fetches information (e.g. physical address, logical name) for the given member addresses. Needs to add responses to theResponses
object. IfDiscovery.async_discovery
is true, this method will be called in a separate thread, otherwise the caller's thread will be used.- Specified by:
findMembers
in classDiscovery
- Parameters:
members
- A list of logical addresses (typicallyUUID
s). If null, then information for all members is fetchedinitial_discovery
- Set to true if this is for the initial membership discovery. Some protocols (e.g. file based ones) may return only the information for the coordinator(s).responses
- The list to which responses should be added
-
invokeFindMembers
protected void invokeFindMembers(java.util.List<Address> members, boolean initial_discovery, Responses rsps, boolean async)
Description copied from class:Discovery
- Overrides:
invokeFindMembers
in classDiscovery
-
-