Brooklyn

brooklyn.management
[Java] Interface LocationManager


public interface LocationManager

For managing and querying entities.


Method Summary
java.lang.Object createLocation(LocationSpec spec)

Creates a new location, which is tracked by the management context.

java.lang.Object createLocation(java.util.Map config, java.lang.Class type)

Convenience (particularly for groovy code) to create a location.

Location getLocation(java.lang.String id)

Returns the location under management (e.g. in use) with the given identifier (e.g. random string; and different to the LocationDefinition id).

java.util.Collection getLocations()

All locations under control of this management plane.

boolean isManaged(Location loc)

whether the location is under management by this management context

Location manage(Location loc)

Begins management for the given location and its children, recursively.

void unmanage(Location loc)

Causes the given location and its children, recursively, to be removed from the management plane (for instance because the location is no longer relevant).

 

Method Detail

createLocation

public java.lang.Object createLocation(LocationSpec spec)
Creates a new location, which is tracked by the management context.
Parameters:
spec


createLocation

public java.lang.Object createLocation(java.util.Map config, java.lang.Class type)
Convenience (particularly for groovy code) to create a location. Equivalent to createLocation(LocationSpec.create(type).configure(config))
See Also:
createLocation(brooklyn.location.LocationSpec)


getLocation

public Location getLocation(java.lang.String id)
Returns the location under management (e.g. in use) with the given identifier (e.g. random string; and different to the LocationDefinition id). May return a full instance, or a proxy to one which is remote. If no location found with that id, returns null.


getLocations

public java.util.Collection getLocations()
All locations under control of this management plane. This returns a snapshot of the current locations; it will not reflect future changes in the locations. If no locations are found, the collection will be empty (i.e. null is never returned).


isManaged

public boolean isManaged(Location loc)
whether the location is under management by this management context


manage

public Location manage(Location loc)
Begins management for the given location and its children, recursively. depending on the implementation of the management context, this might push it out to one or more remote management nodes. Manage a location.
deprecated:
in 0.6.0; use createLocation(LocationSpec) instead.
Since:
0.6.0 (added only for backwards compatibility, where locations are being created directly).


unmanage

public void unmanage(Location loc)
Causes the given location and its children, recursively, to be removed from the management plane (for instance because the location is no longer relevant). If the given location is not managed (e.g. it has already been unmanaged) then this is a no-op (though it may be logged so duplicate calls are best avoided).


 

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