org.jclouds.compute.util
Class ConcurrentOpenSocketFinder
java.lang.Object
org.jclouds.compute.util.ConcurrentOpenSocketFinder
- All Implemented Interfaces:
- OpenSocketFinder
public class ConcurrentOpenSocketFinder
- extends Object
- implements OpenSocketFinder
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
findOpenSocketOnNode
public com.google.common.net.HostAndPort findOpenSocketOnNode(NodeMetadata node,
int port,
long timeout,
TimeUnit timeUnits)
- Specified by:
findOpenSocketOnNode in interface OpenSocketFinder
- Parameters:
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:port
- Returns:
- The reachable ip:port
retryPredicate
protected <T> com.google.common.base.Predicate<T> retryPredicate(com.google.common.base.Predicate<T> findOrBreak,
long timeout,
long period,
TimeUnit timeUnits)
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.