org.jclouds.ec2.compute.strategy
Class EC2ListNodesStrategy

java.lang.Object
  extended by org.jclouds.ec2.compute.strategy.EC2ListNodesStrategy
All Implemented Interfaces:
ListNodesStrategy
Direct Known Subclasses:
AWSEC2ListNodesStrategy

@Singleton
public class EC2ListNodesStrategy
extends Object
implements ListNodesStrategy

Author:
Adrian Cole

Field Summary
protected  EC2AsyncClient client
           
protected  ExecutorService executor
           
protected  Logger logger
           
protected  Set<String> regions
           
protected  com.google.common.base.Function<RunningInstance,NodeMetadata> runningInstanceToNodeMetadata
           
 
Constructor Summary
protected EC2ListNodesStrategy(EC2AsyncClient client, Set<String> regions, com.google.common.base.Function<RunningInstance,NodeMetadata> runningInstanceToNodeMetadata, ExecutorService executor)
           
 
Method Summary
 Set<? extends NodeMetadata> listDetailsOnNodesMatching(com.google.common.base.Predicate<ComputeMetadata> filter)
           
 Set<? extends ComputeMetadata> listNodes()
           
protected  Iterable<? extends RunningInstance> pollRunningInstances()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

@Named(value="jclouds.compute")
protected Logger logger

client

protected final EC2AsyncClient client

regions

protected final Set<String> regions

runningInstanceToNodeMetadata

protected final com.google.common.base.Function<RunningInstance,NodeMetadata> runningInstanceToNodeMetadata

executor

protected final ExecutorService executor
Constructor Detail

EC2ListNodesStrategy

@Inject
protected EC2ListNodesStrategy(EC2AsyncClient client,
                                      Set<String> regions,
                                      com.google.common.base.Function<RunningInstance,NodeMetadata> runningInstanceToNodeMetadata,
                                      @Named(value="jclouds.user-threads")
                                      ExecutorService executor)
Method Detail

listNodes

public Set<? extends ComputeMetadata> listNodes()
Specified by:
listNodes in interface ListNodesStrategy

listDetailsOnNodesMatching

public Set<? extends NodeMetadata> listDetailsOnNodesMatching(com.google.common.base.Predicate<ComputeMetadata> filter)
Specified by:
listDetailsOnNodesMatching in interface ListNodesStrategy

pollRunningInstances

protected Iterable<? extends RunningInstance> pollRunningInstances()


Copyright © 2009-2011 jclouds. All Rights Reserved.