Class 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
    • Field Detail

      • discovery_protocols

        protected final java.util.List<Discovery> discovery_protocols
    • Constructor Detail

      • MULTI_PING

        public MULTI_PING()
    • 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.
        Overrides:
        init in class Discovery
        Throws:
        java.lang.Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the channel constructor will throw an exception
      • 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 class Discovery
      • 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 the Responses object. If Discovery.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 class Discovery
        Parameters:
        members - A list of logical addresses (typically UUIDs). If null, then information for all members is fetched
        initial_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
      • findMembers

        protected void findMembers​(java.util.List<Address> members,
                                   boolean initial_discovery,
                                   Responses rsps,
                                   boolean async)