org.jclouds.ec2.compute.strategy
Class EC2DestroyNodeStrategy

java.lang.Object
  extended by org.jclouds.ec2.compute.strategy.EC2DestroyNodeStrategy
All Implemented Interfaces:
DestroyNodeStrategy
Direct Known Subclasses:
AWSEC2DestroyNodeStrategy

@Singleton
public class EC2DestroyNodeStrategy
extends Object
implements DestroyNodeStrategy

Author:
Adrian Cole

Field Summary
protected  EC2Client client
           
protected  com.google.common.cache.LoadingCache<RegionAndName,String> elasticIpCache
           
protected  GetNodeMetadataStrategy getNode
           
protected  Logger logger
           
 
Constructor Summary
protected EC2DestroyNodeStrategy(EC2Client client, GetNodeMetadataStrategy getNode, com.google.common.cache.LoadingCache<RegionAndName,String> elasticIpCache)
           
 
Method Summary
protected  void destroyInstanceInRegion(String instanceId, String region)
           
 NodeMetadata destroyNode(String id)
           
protected  void releaseAnyPublicIpForInstanceInRegion(String instanceId, String region)
           
 
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 EC2Client client

getNode

protected final GetNodeMetadataStrategy getNode

elasticIpCache

protected final com.google.common.cache.LoadingCache<RegionAndName,String> elasticIpCache
Constructor Detail

EC2DestroyNodeStrategy

@Inject
protected EC2DestroyNodeStrategy(EC2Client client,
                                        GetNodeMetadataStrategy getNode,
                                        @Named(value="ELASTICIP")
                                        com.google.common.cache.LoadingCache<RegionAndName,String> elasticIpCache)
Method Detail

destroyNode

public NodeMetadata destroyNode(String id)
Specified by:
destroyNode in interface DestroyNodeStrategy
Returns:
null if the node wasn't found

releaseAnyPublicIpForInstanceInRegion

protected void releaseAnyPublicIpForInstanceInRegion(String instanceId,
                                                     String region)

destroyInstanceInRegion

protected void destroyInstanceInRegion(String instanceId,
                                       String region)


Copyright © 2009-2012 jclouds. All Rights Reserved.