public class ConcurrentOpenSocketFinder extends Object implements OpenSocketFinder
Modifier and Type | Method and Description |
---|---|
com.google.common.net.HostAndPort |
findOpenSocketOnNode(NodeMetadata node,
int port,
long timeout,
TimeUnit timeUnits) |
protected <T> com.google.common.base.Predicate<T> |
retryPredicate(com.google.common.base.Predicate<T> findOrBreak,
long timeout,
long period,
TimeUnit timeUnits) |
public com.google.common.net.HostAndPort findOpenSocketOnNode(NodeMetadata node, int port, long timeout, TimeUnit timeUnits)
findOpenSocketOnNode
in interface OpenSocketFinder
node
- The node (checking its public and private addresses)port
- The port to try to connect totimeout
- Max time to try to connect to the ip:portprotected <T> com.google.common.base.Predicate<T> retryPredicate(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, TimeUnit timeUnits)
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.