Brooklyn

brooklyn.location.basic
[Java] Class FixedListMachineProvisioningLocation

java.lang.Object
  brooklyn.location.basic.AbstractLocation
      brooklyn.location.basic.FixedListMachineProvisioningLocation
All Implemented Interfaces:
java.io.Closeable, MachineProvisioningLocation

public class FixedListMachineProvisioningLocation
extends AbstractLocation

A provisioner of MachineLocations which takes a list of machines it can connect to. The collection of initial machines should be supplied in the 'machines' flag in the constructor, for example a list of machines which can be SSH'd to. This can be extended to have a mechanism to make more machines to be available (override provisionMore and canProvisionMore).


Nested Class Summary
static class FixedListMachineProvisioningLocation.Builder

Facilitates fluent/programmatic style for constructing a fixed pool of machines.

 
Field Summary
protected java.util.Set inUse

protected java.util.Set machines

protected java.util.Set pendingRemoval

 
Fields inherited from class AbstractLocation
LOG, PARENT_LOCATION, hostGeoInfo, name
 
Constructor Summary
FixedListMachineProvisioningLocation()

FixedListMachineProvisioningLocation(java.util.Map properties)

 
Method Summary
void addChildLocation(Location child)

void addMachine(java.lang.Object machine)

boolean canProvisionMore()

void close()

protected void configure(java.util.Map properties)

java.util.Set getAllMachines()

java.util.Set getAvailable()

java.util.Set getInUse()

protected java.util.Set getMachines()

java.util.Map getProvisioningFlags(java.util.Collection tags)

FixedListMachineProvisioningLocation newSubLocation(java.util.Map newFlags)

java.lang.Object obtain()

java.lang.Object obtain(java.util.Map flags)

void provisionMore(int size)

void release(java.lang.Object machine)

protected boolean removeChildLocation(Location child)

void removeMachine(java.lang.Object machine)

 
Methods inherited from class AbstractLocation
addChildLocation, configure, configure, containsLocation, equals, findLocationProperty, getAllConfig, getChildLocations, getConfig, getConfigBag, getHostGeoInfo, getId, getLocationProperty, getName, getParentLocation, getRebindSupport, hasConfig, hasLocationProperty, hashCode, removeChildLocation, setConfig, setHostGeoInfo, setName, setParentLocation, string, toString
 

Field Detail

inUse

@SetFromFlag
protected java.util.Set inUse


machines

@SetFromFlag
protected java.util.Set machines


pendingRemoval

@SetFromFlag
protected java.util.Set pendingRemoval


 
Constructor Detail

FixedListMachineProvisioningLocation

public FixedListMachineProvisioningLocation()


FixedListMachineProvisioningLocation

public FixedListMachineProvisioningLocation(java.util.Map properties)


 
Method Detail

addChildLocation

@Override
public void addChildLocation(Location child)


addMachine

public void addMachine(java.lang.Object machine)


canProvisionMore

public boolean canProvisionMore()


close

@Override
public void close()


configure

protected void configure(java.util.Map properties)


getAllMachines

public java.util.Set getAllMachines()


getAvailable

public java.util.Set getAvailable()


getInUse

public java.util.Set getInUse()


getMachines

protected java.util.Set getMachines()


getProvisioningFlags

@Override
public java.util.Map getProvisioningFlags(java.util.Collection tags)


newSubLocation

public FixedListMachineProvisioningLocation newSubLocation(java.util.Map newFlags)


obtain

public java.lang.Object obtain()


obtain

@Override
public java.lang.Object obtain(java.util.Map flags)


provisionMore

public void provisionMore(int size)


release

@Override
public void release(java.lang.Object machine)


removeChildLocation

@Override
protected boolean removeChildLocation(Location child)


removeMachine

public void removeMachine(java.lang.Object machine)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.