@Singleton public class EC2ComputeService extends BaseComputeService
context, credentialStore, logger
Modifier | Constructor and Description |
---|---|
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,
Provider<TemplateBuilder> templateBuilderProvider,
Provider<TemplateOptions> templateOptionsProvider,
com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning,
com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeTerminated,
com.google.common.base.Predicate<AtomicReference<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.LoadingCache<RegionAndName,String> securityGroupMap) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanUpIncidentalResources(String region,
String group) |
protected void |
cleanUpIncidentalResourcesOfDeadNodes(Set<? extends NodeMetadata> deadNodes)
Cleans implicit keypairs and security groups.
|
protected com.google.common.collect.ImmutableSet<String> |
extractIdsFromInstances(Iterable<? extends RunningInstance> deadOnes) |
EC2TemplateOptions |
templateOptions()
returns template options, except of type
EC2TemplateOptions . |
protected com.google.common.base.Predicate<RunningInstance> |
usingKeyPairAndNotDead(KeyPair keyPair) |
createNodesInGroup, createNodesInGroup, createNodesInGroup, destroyNode, destroyNodesMatching, doDestroyNode, getContext, getNodeMetadata, listAssignableLocations, listHardwareProfiles, listImages, listNodes, listNodesDetailsMatching, rebootNode, rebootNodesMatching, resumeNode, resumeNodesMatching, runScriptOnNode, runScriptOnNode, runScriptOnNode, runScriptOnNode, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, submitScriptOnNode, suspendNode, suspendNodesMatching, templateBuilder, updateNodeWithCredentialsIfPresent
@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, Provider<TemplateBuilder> templateBuilderProvider, Provider<TemplateOptions> templateOptionsProvider, @Named(value="NODE_RUNNING") com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning, @Named(value="NODE_TERMINATED") com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeTerminated, @Named(value="NODE_SUSPENDED") com.google.common.base.Predicate<AtomicReference<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.LoadingCache<RegionAndName,String> securityGroupMap)
protected com.google.common.collect.ImmutableSet<String> extractIdsFromInstances(Iterable<? extends RunningInstance> deadOnes)
protected com.google.common.base.Predicate<RunningInstance> usingKeyPairAndNotDead(KeyPair keyPair)
protected void cleanUpIncidentalResourcesOfDeadNodes(Set<? extends NodeMetadata> deadNodes)
cleanUpIncidentalResourcesOfDeadNodes
in class BaseComputeService
public EC2TemplateOptions templateOptions()
EC2TemplateOptions
.templateOptions
in interface ComputeService
templateOptions
in class BaseComputeService
Copyright © 2009-2012 jclouds. All Rights Reserved.