public abstract class BaseNodePoolComputeServiceAdapter extends Object implements NodePoolComputeServiceAdapter
NodePoolComputeService
, takes care of keeping (not changing assignments)
and of everything that does not change the pool.JCloudsNativeComputeServiceAdapter.NodeWithInitialCredentials
ComputeServiceAdapter.NodeAndInitialCredentials<N>
Modifier and Type | Field and Description |
---|---|
protected com.google.common.base.Supplier<ComputeService> |
backendComputeService |
protected com.google.common.base.Supplier<Template> |
backendTemplate |
protected AdminAccess.Builder |
initialCredentialsBuilder |
protected NodeMetadataStore |
metadataStore |
protected String |
poolGroupName |
Constructor and Description |
---|
BaseNodePoolComputeServiceAdapter(com.google.common.base.Supplier<ComputeService> backendComputeService,
com.google.common.base.Supplier<Template> backendTemplate,
String poolGroupName,
NodeMetadataStore metadataStore,
String poolNodeAdminAccess,
AdminAccess.Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
protected Set<? extends NodeMetadata> |
addToPool(int number) |
void |
destroyPool() |
ComputeServiceContext |
getBackendComputeServiceContext() |
protected Set<NodeMetadata> |
getBackendNodes() |
Image |
getImage(String id)
get a specific image by id
|
NodeMetadata |
getNode(String id) |
String |
getPoolGroupName() |
Iterable<Hardware> |
listHardwareProfiles()
Hardware profiles describe available cpu, memory, and disk configurations that can be used to
run a node.
|
Iterable<Image> |
listImages()
Images are the available configured operating systems that someone can run a node with.
|
Iterable<Location> |
listLocations() |
Iterable<NodeMetadata> |
listNodes() |
void |
rebootNode(String id) |
void |
resumeNode(String id) |
void |
suspendNode(String id) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
currentSize, idleNodes, maxNodes, minNodes, usedNodes
createNodeWithGroupEncodedIntoName, destroyNode
protected final com.google.common.base.Supplier<ComputeService> backendComputeService
protected final com.google.common.base.Supplier<Template> backendTemplate
protected final String poolGroupName
protected final NodeMetadataStore metadataStore
protected final AdminAccess.Builder initialCredentialsBuilder
public BaseNodePoolComputeServiceAdapter(com.google.common.base.Supplier<ComputeService> backendComputeService, com.google.common.base.Supplier<Template> backendTemplate, @Named(value="jclouds.nodepool.backend-group") String poolGroupName, NodeMetadataStore metadataStore, @Named(value="jclouds.nodepool.admin-access") String poolNodeAdminAccess, AdminAccess.Configuration configuration)
public NodeMetadata getNode(String id)
JCloudsNativeComputeServiceAdapter
getNode
in interface ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>
getNode
in interface JCloudsNativeComputeServiceAdapter
public Iterable<NodeMetadata> listNodes()
JCloudsNativeComputeServiceAdapter
listNodes
in interface ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>
listNodes
in interface JCloudsNativeComputeServiceAdapter
public Iterable<Hardware> listHardwareProfiles()
JCloudsNativeComputeServiceAdapter
listHardwareProfiles
in interface ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>
listHardwareProfiles
in interface JCloudsNativeComputeServiceAdapter
ComputeService.listHardwareProfiles()
public Iterable<Image> listImages()
JCloudsNativeComputeServiceAdapter
listImages
in interface ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>
listImages
in interface JCloudsNativeComputeServiceAdapter
ComputeService.listImages()
public Iterable<Location> listLocations()
JCloudsNativeComputeServiceAdapter
listLocations
in interface ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>
listLocations
in interface JCloudsNativeComputeServiceAdapter
public Image getImage(String id)
ComputeServiceAdapter
getImage
in interface ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>
id
- ComputeMetadata.getId()
, which is not necessarily ComputeMetadata.getProviderId()
public void suspendNode(String id)
suspendNode
in interface ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>
public void resumeNode(String id)
resumeNode
in interface ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>
public void rebootNode(String id)
JCloudsNativeComputeServiceAdapter
rebootNode
in interface ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>
rebootNode
in interface JCloudsNativeComputeServiceAdapter
protected Set<NodeMetadata> getBackendNodes()
public void destroyPool()
destroyPool
in interface NodePoolComputeServiceAdapter
public ComputeServiceContext getBackendComputeServiceContext()
getBackendComputeServiceContext
in interface NodePoolComputeServiceAdapter
protected Set<? extends NodeMetadata> addToPool(int number)
public String getPoolGroupName()
getPoolGroupName
in interface NodePoolComputeServiceAdapter
Copyright © 2009-2013 jclouds. All Rights Reserved.