Interface OpenSocketFinder

  • All Known Implementing Classes:
    ConcurrentOpenSocketFinder

    public interface OpenSocketFinder
    For finding an open/reachable ip:port for a node.
    • Method Detail

      • findOpenSocketOnNode

        com.google.common.net.HostAndPort findOpenSocketOnNode​(NodeMetadata node,
                                                               int port,
                                                               long timeoutValue,
                                                               TimeUnit timeUnits)
        Parameters:
        node - The node (checking its public and private addresses)
        port - The port to try to connect to
        timeoutValue - Max time to try to connect to the ip:port
        timeUnits -
        Returns:
        The reachable ip:port
        Throws:
        NoSuchElementException - If no ports accessible within the given time
        IllegalStateException - If the given node has no public or private addresses