Brooklyn

brooklyn.location.basic
[Java] Class FixedListMachineProvisioningLocation

java.lang.Object
  brooklyn.location.basic.AbstractLocation
      brooklyn.location.basic.FixedListMachineProvisioningLocation
All Implemented Interfaces:
CoordinatesProvider, 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

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

FixedListMachineProvisioningLocation(java.util.Map properties)

 
Method Summary
protected void addChildLocation(Location child)

boolean canProvisionMore()

protected void configure(java.util.Map properties)

java.util.Set getAvailable()

protected java.util.Set getInUse()

double getLatitude()

double getLongitude()

protected java.util.Set getMachines()

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

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)

 
Methods inherited from class AbstractLocation
addChildLocation, configure, configure, containsLocation, equals, findLocationProperty, getChildLocations, getHostGeoInfo, getId, getLocationProperty, getName, getParentLocation, hasLocationProperty, hashCode, removeChildLocation, setHostGeoInfo, setParentLocation, string, toString
 

Field Detail

inUse

protected java.util.Set inUse


machines

@SetFromFlag("machines")
protected java.util.Set machines


 
Constructor Detail

FixedListMachineProvisioningLocation

public FixedListMachineProvisioningLocation()


FixedListMachineProvisioningLocation

public FixedListMachineProvisioningLocation(java.util.Map properties)


 
Method Detail

addChildLocation

@Override
protected void addChildLocation(Location child)


canProvisionMore

public boolean canProvisionMore()


configure

protected void configure(java.util.Map properties)


getAvailable

public java.util.Set getAvailable()


getInUse

protected java.util.Set getInUse()


getLatitude

public double getLatitude()


getLongitude

public double getLongitude()


getMachines

protected java.util.Set getMachines()


getProvisioningFlags

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


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)


 

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