Package org.jclouds.ec2.compute.strategy
Class EC2DestroyNodeStrategy
- java.lang.Object
-
- org.jclouds.ec2.compute.strategy.EC2DestroyNodeStrategy
-
- All Implemented Interfaces:
DestroyNodeStrategy
- Direct Known Subclasses:
AWSEC2DestroyNodeStrategy
@Singleton public class EC2DestroyNodeStrategy extends Object implements DestroyNodeStrategy
-
-
Field Summary
Fields Modifier and Type Field Description protected EC2Api
client
protected com.google.common.cache.LoadingCache<RegionAndName,String>
elasticIpCache
protected GetNodeMetadataStrategy
getNode
protected Logger
logger
-
Constructor Summary
Constructors Modifier Constructor Description protected
EC2DestroyNodeStrategy(EC2Api client, GetNodeMetadataStrategy getNode, com.google.common.cache.LoadingCache<RegionAndName,String> elasticIpCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
destroyInstanceInRegion(String instanceId, String region)
NodeMetadata
destroyNode(String id)
protected void
releaseAnyPublicIpForInstanceInRegion(String instanceId, String region)
-
-
-
Field Detail
-
logger
@Named("jclouds.compute") protected Logger logger
-
client
protected final EC2Api client
-
getNode
protected final GetNodeMetadataStrategy getNode
-
elasticIpCache
protected final com.google.common.cache.LoadingCache<RegionAndName,String> elasticIpCache
-
-
Constructor Detail
-
EC2DestroyNodeStrategy
@Inject protected EC2DestroyNodeStrategy(EC2Api client, GetNodeMetadataStrategy getNode, @Named("ELASTICIP") com.google.common.cache.LoadingCache<RegionAndName,String> elasticIpCache)
-
-
Method Detail
-
destroyNode
public NodeMetadata destroyNode(String id)
- Specified by:
destroyNode
in interfaceDestroyNodeStrategy
- Returns:
- null if the node wasn't found
-
releaseAnyPublicIpForInstanceInRegion
protected void releaseAnyPublicIpForInstanceInRegion(String instanceId, String region)
-
-