public class SingleMachineProvisioningLocation<T extends MachineLocation> extends FixedListMachineProvisioningLocation<T>
FixedListMachineProvisioningLocation.Builder
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal
LOG, PARENT_LOCATION, TEMPORARY_LOCATION
FINAL_SPEC, NAMED_SPEC_NAME, ORIGINAL_SPEC
Constructor and Description |
---|
SingleMachineProvisioningLocation() |
SingleMachineProvisioningLocation(java.lang.String location,
java.util.Map locationFlags) |
Modifier and Type | Method and Description |
---|---|
T |
obtain() |
T |
obtain(java.util.Map flags)
Obtain a machine in this location.
|
void |
release(T machine)
Release a previously-obtained machine.
|
addChild, addMachine, close, configure, getAllMachines, getAvailable, getInUse, getProvisioningFlags, init, newSubLocation, removeChild, removeMachine, toVerboseString
addExtension, config, containsLocation, equals, getAllConfig, getAllConfigBag, getChildren, getConfig, getConfig, getDisplayName, getExtension, getHostGeoInfo, getLocalConfigBag, getParent, getRawLocalConfigBag, getRebindSupport, hasConfig, hasExtension, hashCode, isManaged, onManagementStarted, onManagementStopped, setConfig, setDisplayName, setHostGeoInfo, setManagementContext, setName, setParent, setParent, toMetadataRecord, toString
getCatalogItemId, getId, getManagementContext, getTagSupport, rebind, setCatalogItemId, tags
containsLocation, getAllConfig, getChildren, getConfig, getConfig, getDisplayName, getExtension, getId, getParent, hasConfig, hasExtension, setParent
getCatalogItemId, getTagSupport, tags
config, setConfig
getManagementContext
setCatalogItemId
public SingleMachineProvisioningLocation()
public SingleMachineProvisioningLocation(java.lang.String location, java.util.Map locationFlags)
public T obtain(java.util.Map flags) throws NoMachinesAvailableException
MachineProvisioningLocation
obtain
in interface MachineProvisioningLocation<T extends MachineLocation>
obtain
in interface ProvisioningLocation<T extends MachineLocation>
obtain
in class FixedListMachineProvisioningLocation<T extends MachineLocation>
flags
- Details of the desired machine (e.g. image, size, open ports, etc; some flag support is limited to selected providers).
"callerContext" can be specified to have custom logging and error messages (useful if starting machines in parallel)NoMachinesAvailableException
- if there are no machines available in this location (or impls may return null, but that is discouraged)public T obtain() throws NoMachinesAvailableException
obtain
in class FixedListMachineProvisioningLocation<T extends MachineLocation>
NoMachinesAvailableException
public void release(T machine)
MachineProvisioningLocation
release
in interface MachineProvisioningLocation<T extends MachineLocation>
release
in interface ProvisioningLocation<T extends MachineLocation>
release
in class FixedListMachineProvisioningLocation<T extends MachineLocation>
machine
- a MachineLocation
previously obtained from a call to #obtain()