org.jclouds.ec2.compute
Class EC2ComputeService
java.lang.Object
org.jclouds.compute.internal.BaseComputeService
org.jclouds.ec2.compute.EC2ComputeService
- All Implemented Interfaces:
- ComputeService
- Direct Known Subclasses:
- AWSEC2ComputeService
@Singleton
public class EC2ComputeService
- extends BaseComputeService
- Author:
- Adrian Cole
Constructor Summary |
protected |
EC2ComputeService(ComputeServiceContext context,
Map<String,Credentials> credentialStore,
com.google.common.base.Supplier<Set<? extends Image>> images,
com.google.common.base.Supplier<Set<? extends Hardware>> sizes,
com.google.common.base.Supplier<Set<? extends Location>> locations,
ListNodesStrategy listNodesStrategy,
GetNodeMetadataStrategy getNodeMetadataStrategy,
CreateNodesInGroupThenAddToSet runNodesAndAddToSetStrategy,
RebootNodeStrategy rebootNodeStrategy,
DestroyNodeStrategy destroyNodeStrategy,
ResumeNodeStrategy startNodeStrategy,
SuspendNodeStrategy stopNodeStrategy,
javax.inject.Provider<TemplateBuilder> templateBuilderProvider,
javax.inject.Provider<TemplateOptions> templateOptionsProvider,
com.google.common.base.Predicate<NodeMetadata> nodeRunning,
com.google.common.base.Predicate<NodeMetadata> nodeTerminated,
com.google.common.base.Predicate<NodeMetadata> nodeSuspended,
InitializeRunScriptOnNodeOrPlaceInBadMap.Factory initScriptRunnerFactory,
RunScriptOnNode.Factory runScriptOnNodeFactory,
InitAdminAccess initAdminAccess,
PersistNodeCredentials persistNodeCredentials,
ComputeServiceConstants.Timeouts timeouts,
ExecutorService executor,
EC2Client ec2Client,
ConcurrentMap<RegionAndName,KeyPair> credentialsMap,
com.google.common.cache.Cache<RegionAndName,String> securityGroupMap)
|
Methods inherited from class org.jclouds.compute.internal.BaseComputeService |
createNodesInGroup, createNodesInGroup, createNodesInGroup, destroyNode, getContext, getNodeMetadata, listAssignableLocations, listHardwareProfiles, listImages, listNodes, listNodesDetailsMatching, rebootNode, rebootNodesMatching, resumeNode, resumeNodesMatching, runNodesWithTag, runNodesWithTag, runNodesWithTag, runScriptOnNode, runScriptOnNode, runScriptOnNode, runScriptOnNode, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, submitScriptOnNode, suspendNode, suspendNodesMatching, templateBuilder, updateNodeWithCredentialsIfPresent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EC2ComputeService
@Inject
protected EC2ComputeService(ComputeServiceContext context,
Map<String,Credentials> credentialStore,
com.google.common.base.Supplier<Set<? extends Image>> images,
com.google.common.base.Supplier<Set<? extends Hardware>> sizes,
com.google.common.base.Supplier<Set<? extends Location>> locations,
ListNodesStrategy listNodesStrategy,
GetNodeMetadataStrategy getNodeMetadataStrategy,
CreateNodesInGroupThenAddToSet runNodesAndAddToSetStrategy,
RebootNodeStrategy rebootNodeStrategy,
DestroyNodeStrategy destroyNodeStrategy,
ResumeNodeStrategy startNodeStrategy,
SuspendNodeStrategy stopNodeStrategy,
javax.inject.Provider<TemplateBuilder> templateBuilderProvider,
javax.inject.Provider<TemplateOptions> templateOptionsProvider,
@Named(value="NODE_RUNNING")
com.google.common.base.Predicate<NodeMetadata> nodeRunning,
@Named(value="NODE_TERMINATED")
com.google.common.base.Predicate<NodeMetadata> nodeTerminated,
@Named(value="NODE_SUSPENDED")
com.google.common.base.Predicate<NodeMetadata> nodeSuspended,
InitializeRunScriptOnNodeOrPlaceInBadMap.Factory initScriptRunnerFactory,
RunScriptOnNode.Factory runScriptOnNodeFactory,
InitAdminAccess initAdminAccess,
PersistNodeCredentials persistNodeCredentials,
ComputeServiceConstants.Timeouts timeouts,
@Named(value="jclouds.user-threads")
ExecutorService executor,
EC2Client ec2Client,
ConcurrentMap<RegionAndName,KeyPair> credentialsMap,
@Named(value="SECURITY")
com.google.common.cache.Cache<RegionAndName,String> securityGroupMap)
extractIdsFromInstances
protected com.google.common.collect.ImmutableSet<String> extractIdsFromInstances(Iterable<? extends RunningInstance> deadOnes)
usingKeyPairAndNotDead
protected com.google.common.base.Predicate<RunningInstance> usingKeyPairAndNotDead(KeyPair keyPair)
destroyNodesMatching
public Set<? extends NodeMetadata> destroyNodesMatching(com.google.common.base.Predicate<NodeMetadata> filter)
- like
BaseComputeService.destroyNodesMatching(com.google.common.base.Predicate)
except that this will
clean implicit keypairs and security groups.
- Specified by:
destroyNodesMatching
in interface ComputeService
- Overrides:
destroyNodesMatching
in class BaseComputeService
- Returns:
- list of nodes destroyed
cleanUpIncidentalResources
protected void cleanUpIncidentalResources(Map.Entry<String,String> regionGroup)
templateOptions
public EC2TemplateOptions templateOptions()
- returns template options, except of type
EC2TemplateOptions
.
- Specified by:
templateOptions
in interface ComputeService
- Overrides:
templateOptions
in class BaseComputeService
Copyright © 2009-2011 jclouds. All Rights Reserved.