org.jclouds.nodepool.internal
Class EagerNodePoolComputeServiceAdapter
java.lang.Object
org.jclouds.nodepool.internal.BaseNodePoolComputeServiceAdapter
org.jclouds.nodepool.internal.EagerNodePoolComputeServiceAdapter
- All Implemented Interfaces:
- ComputeServiceAdapter<NodeMetadata,Hardware,Image,Location>, JCloudsNativeComputeServiceAdapter, NodePoolComputeServiceAdapter
@Singleton
public class EagerNodePoolComputeServiceAdapter
- extends BaseNodePoolComputeServiceAdapter
An eager NodePoolComputeService. Eagerly builds and maintains a pool of nodes. It's only
"started" after min nodes are allocated and available.
- Author:
- David Alves
| Methods inherited from class org.jclouds.nodepool.internal.BaseNodePoolComputeServiceAdapter |
addToPool, destroyPool, getBackendComputeServiceContext, getBackendNodes, getImage, getNode, getPoolGroupName, listHardwareProfiles, listImages, listLocations, listNodes, rebootNode, resumeNode, suspendNode |
| 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
EagerNodePoolComputeServiceAdapter
@Inject
public EagerNodePoolComputeServiceAdapter(com.google.common.base.Supplier<ComputeService> backendComputeService,
com.google.common.base.Supplier<Template> backendTemplate,
@Named(value="jclouds.nodepool.backend-group")
String poolGroupPrefix,
@Named(value="jclouds.nodepool.max-size")
int maxSize,
@Named(value="jclouds.nodepool.min-size")
int minSize,
@Named(value="jclouds.nodepool.remove-destroyed")
boolean removeDestroyed,
NodeMetadataStore storage,
@Named(value="jclouds.nodepool.admin-access")
String poolNodeAdminAccess,
AdminAccess.Configuration configuration)
startEagerPool
@PostConstruct
public void startEagerPool()
createNodeWithGroupEncodedIntoName
public JCloudsNativeComputeServiceAdapter.NodeWithInitialCredentials createNodeWithGroupEncodedIntoName(String group,
String name,
Template template)
- Description copied from interface:
ComputeServiceAdapter
ComputeService.createNodesInGroup(String, int, Template) generates the parameters
passed into this method such that each node in the set has a unique name.
note
It is intentional to return the library native node object, as generic type
N. If you are not using library-native objects (such as libvirt Domain) use
JCloudsNativeComputeServiceAdapter instead.
note
Your responsibility is to create a node with the underlying library and return
after storing its credentials in the supplied map corresponding to
credentialStore
- Parameters:
group - used to aggregate nodes with identical configurationname - unique supplied name for the node, which has the group encoded into it.template - includes imageId, locationId, and hardwareId used to resume
the instance.
- Returns:
- library-native representation of a node. TODO: return typed exception on
createNodeFailure
- See Also:
ComputeService.createNodesInGroup(String, int, Template)
destroyNode
public void destroyNode(String id)
- Description copied from interface:
JCloudsNativeComputeServiceAdapter
-
currentSize
public int currentSize()
idleNodes
public int idleNodes()
maxNodes
public int maxNodes()
minNodes
public int minNodes()
usedNodes
public int usedNodes()
Copyright © 2009-2012 jclouds. All Rights Reserved.