org.jclouds.compute.util
Class ConcurrentOpenSocketFinder

java.lang.Object
  extended by org.jclouds.compute.util.ConcurrentOpenSocketFinder
All Implemented Interfaces:
OpenSocketFinder

public class ConcurrentOpenSocketFinder
extends Object
implements OpenSocketFinder


Constructor Summary
ConcurrentOpenSocketFinder(SocketOpen socketTester, com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning, ExecutorService userThreads)
           
 
Method Summary
 com.google.common.net.HostAndPort findOpenSocketOnNode(NodeMetadata node, int port, long timeoutValue, TimeUnit timeUnits)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrentOpenSocketFinder

@Inject
public ConcurrentOpenSocketFinder(SocketOpen socketTester,
                                         @Named(value="jclouds.compute.timeout.node-running")
                                         com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning,
                                         @Named(value="jclouds.user-threads")
                                         ExecutorService userThreads)
Method Detail

findOpenSocketOnNode

public com.google.common.net.HostAndPort findOpenSocketOnNode(NodeMetadata node,
                                                              int port,
                                                              long timeoutValue,
                                                              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 to
timeoutValue - Max time to try to connect to the ip:port
Returns:
The reachable ip:port


Copyright © 2009-2012 jclouds. All Rights Reserved.