public class LocalLocationManager extends java.lang.Object implements LocationManagerInternal
Modifier and Type | Field and Description |
---|---|
static ConfigKey<java.lang.Boolean> |
CREATE_UNMANAGED |
Constructor and Description |
---|
LocalLocationManager(LocalManagementContext managementContext) |
Modifier and Type | Method and Description |
---|---|
<T extends Location> |
createLocation(LocationSpec<T> spec)
Creates a new location, which is tracked by the management context.
|
<T extends Location> |
createLocation(java.util.Map<?,?> config,
java.lang.Class<T> type)
Convenience (particularly for groovy code) to create a location.
|
ManagementTransitionMode |
getLastManagementTransitionMode(java.lang.String itemId) |
Location |
getLocation(java.lang.String id)
Returns the location under management (e.g.
|
Location |
getLocationEvenIfPreManaged(java.lang.String id) |
InternalLocationFactory |
getLocationFactory() |
java.util.Collection<java.lang.String> |
getLocationIds() |
java.util.Collection<Location> |
getLocations()
All locations under control of this management plane.
|
boolean |
isKnownLocationId(java.lang.String id) |
boolean |
isManaged(Location loc)
whether the location is under management by this management context
|
Location |
manage(Location loc)
management on creation
|
void |
manageRebindedRoot(Location item)
Begins management for the given rebinded root, recursively;
if rebinding as a read-only copy,
#setReadOnly(T, boolean) should be called prior to this. |
void |
setManagementTransitionMode(Location item,
ManagementTransitionMode mode) |
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).
|
void |
unmanage(Location loc,
ManagementTransitionMode mode) |
@Beta public static final ConfigKey<java.lang.Boolean> CREATE_UNMANAGED
public LocalLocationManager(LocalManagementContext managementContext)
public InternalLocationFactory getLocationFactory()
public <T extends Location> T createLocation(LocationSpec<T> spec)
LocationManager
createLocation
in interface LocationManager
public <T extends Location> T createLocation(java.util.Map<?,?> config, java.lang.Class<T> type)
LocationManager
createLocation(LocationSpec.create(type).configure(config))
createLocation
in interface LocationManager
LocationManager.createLocation(LocationSpec)
public java.util.Collection<Location> getLocations()
LocationManager
getLocations
in interface LocationManager
public java.util.Collection<java.lang.String> getLocationIds()
getLocationIds
in interface LocationManagerInternal
public Location getLocation(java.lang.String id)
LocationManager
getLocation
in interface LocationManager
public Location getLocationEvenIfPreManaged(java.lang.String id)
public boolean isManaged(Location loc)
LocationManager
isManaged
in interface LocationManager
public boolean isKnownLocationId(java.lang.String id)
public ManagementTransitionMode getLastManagementTransitionMode(java.lang.String itemId)
getLastManagementTransitionMode
in interface BrooklynObjectManagerInternal<Location>
public void setManagementTransitionMode(Location item, ManagementTransitionMode mode)
setManagementTransitionMode
in interface BrooklynObjectManagerInternal<Location>
public Location manage(Location loc)
manage
in interface LocationManager
public void manageRebindedRoot(Location item)
BrooklynObjectManagerInternal
#setReadOnly(T, boolean)
should be called prior to this.manageRebindedRoot
in interface BrooklynObjectManagerInternal<Location>
public void unmanage(Location loc)
LocationManager
unmanage
in interface LocationManager
public void unmanage(Location loc, ManagementTransitionMode mode)
unmanage
in interface BrooklynObjectManagerInternal<Location>