Package org.jclouds.ec2.compute.strategy
Class EC2ListNodesStrategy
- java.lang.Object
-
- org.jclouds.ec2.compute.strategy.EC2ListNodesStrategy
-
- All Implemented Interfaces:
ListNodesStrategy
- Direct Known Subclasses:
AWSEC2ListNodesStrategy
@Singleton public class EC2ListNodesStrategy extends Object implements ListNodesStrategy
-
-
Field Summary
Fields Modifier and Type Field Description protected EC2Api
client
protected Logger
logger
protected static Long
maxTime
protected com.google.common.base.Supplier<Set<String>>
regions
protected com.google.common.base.Function<RunningInstance,NodeMetadata>
runningInstanceToNodeMetadata
protected com.google.common.util.concurrent.ListeningExecutorService
userExecutor
-
Constructor Summary
Constructors Modifier Constructor Description protected
EC2ListNodesStrategy(EC2Api client, com.google.common.base.Supplier<Set<String>> regions, com.google.common.base.Function<RunningInstance,NodeMetadata> runningInstanceToNodeMetadata, com.google.common.util.concurrent.ListeningExecutorService userExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.google.common.base.Function<String,Set<? extends Reservation<? extends RunningInstance>>>
allInstancesInRegion()
protected com.google.common.base.Function<String,Set<? extends Reservation<? extends RunningInstance>>>
instancesByIdInRegion(com.google.common.collect.Multimap<String,String> idsByRegions)
Set<? extends NodeMetadata>
listDetailsOnNodesMatching(com.google.common.base.Predicate<? super NodeMetadata> filter)
Set<? extends ComputeMetadata>
listNodes()
Set<? extends NodeMetadata>
listNodesByIds(Iterable<String> ids)
protected Iterable<? extends RunningInstance>
pollRunningInstances()
protected Iterable<? extends RunningInstance>
pollRunningInstancesByRegionsAndIds(com.google.common.collect.Multimap<String,String> idsByRegions)
protected com.google.common.base.Function<String,String>
splitHandle(int pos)
-
-
-
Field Detail
-
logger
@Named("jclouds.compute") protected Logger logger
-
maxTime
@Inject(optional=true) @Named("jclouds.request-timeout") protected static Long maxTime
-
client
protected final EC2Api client
-
runningInstanceToNodeMetadata
protected final com.google.common.base.Function<RunningInstance,NodeMetadata> runningInstanceToNodeMetadata
-
userExecutor
protected final com.google.common.util.concurrent.ListeningExecutorService userExecutor
-
-
Constructor Detail
-
EC2ListNodesStrategy
@Inject protected EC2ListNodesStrategy(EC2Api client, com.google.common.base.Supplier<Set<String>> regions, com.google.common.base.Function<RunningInstance,NodeMetadata> runningInstanceToNodeMetadata, @Named("jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor)
-
-
Method Detail
-
listNodes
public Set<? extends ComputeMetadata> listNodes()
- Specified by:
listNodes
in interfaceListNodesStrategy
-
listNodesByIds
public Set<? extends NodeMetadata> listNodesByIds(Iterable<String> ids)
- Specified by:
listNodesByIds
in interfaceListNodesStrategy
-
listDetailsOnNodesMatching
public Set<? extends NodeMetadata> listDetailsOnNodesMatching(com.google.common.base.Predicate<? super NodeMetadata> filter)
- Specified by:
listDetailsOnNodesMatching
in interfaceListNodesStrategy
-
pollRunningInstances
protected Iterable<? extends RunningInstance> pollRunningInstances()
-
pollRunningInstancesByRegionsAndIds
protected Iterable<? extends RunningInstance> pollRunningInstancesByRegionsAndIds(com.google.common.collect.Multimap<String,String> idsByRegions)
-
allInstancesInRegion
protected com.google.common.base.Function<String,Set<? extends Reservation<? extends RunningInstance>>> allInstancesInRegion()
-
instancesByIdInRegion
protected com.google.common.base.Function<String,Set<? extends Reservation<? extends RunningInstance>>> instancesByIdInRegion(com.google.common.collect.Multimap<String,String> idsByRegions)
-
-