org.jclouds.compute.strategy.impl
Class AdaptingComputeServiceStrategies<N,H,I,L>
java.lang.Object
org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies<N,H,I,L>
- All Implemented Interfaces:
- CreateNodeWithGroupEncodedIntoName, DestroyNodeStrategy, GetNodeMetadataStrategy, ListNodesStrategy, RebootNodeStrategy, ResumeNodeStrategy, SuspendNodeStrategy
@Singleton
public class AdaptingComputeServiceStrategies<N,H,I,L>
- extends Object
- implements CreateNodeWithGroupEncodedIntoName, DestroyNodeStrategy, GetNodeMetadataStrategy, ListNodesStrategy, RebootNodeStrategy, ResumeNodeStrategy, SuspendNodeStrategy
- Author:
- Adrian Cole
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
@Named(value="jclouds.compute")
protected Logger logger
AdaptingComputeServiceStrategies
@Inject
public AdaptingComputeServiceStrategies(Map<String,Credentials> credentialStore,
ComputeServiceAdapter<N,H,I,L> client,
com.google.common.base.Function<N,NodeMetadata> nodeMetadataAdapter)
listNodes
public Iterable<? extends ComputeMetadata> listNodes()
- Specified by:
listNodes
in interface ListNodesStrategy
listDetailsOnNodesMatching
public Iterable<? extends NodeMetadata> listDetailsOnNodesMatching(com.google.common.base.Predicate<ComputeMetadata> filter)
- Specified by:
listDetailsOnNodesMatching
in interface ListNodesStrategy
getNode
public NodeMetadata getNode(String id)
- Specified by:
getNode
in interface GetNodeMetadataStrategy
rebootNode
public NodeMetadata rebootNode(String id)
- Specified by:
rebootNode
in interface RebootNodeStrategy
resumeNode
public NodeMetadata resumeNode(String id)
- Specified by:
resumeNode
in interface ResumeNodeStrategy
suspendNode
public NodeMetadata suspendNode(String id)
- Specified by:
suspendNode
in interface SuspendNodeStrategy
destroyNode
public NodeMetadata destroyNode(String id)
- Specified by:
destroyNode
in interface DestroyNodeStrategy
- Returns:
- null if the node wasn't found
createNodeWithGroupEncodedIntoName
public NodeMetadata createNodeWithGroupEncodedIntoName(String group,
String name,
Template template)
- create a node given the name and template parameters such as imageid, hardwareid, and
locationid.
- Specified by:
createNodeWithGroupEncodedIntoName
in interface CreateNodeWithGroupEncodedIntoName
- Parameters:
group
- group name supplied by the username
- supplied by CreateNodesInGroupThenAddToSet
and must have the tag encoded into
it.template
- supplied by the user
- Returns:
- NodeMetadata from the new object, most likely in some pending state.
Copyright © 2009-2011 jclouds. All Rights Reserved.