|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Location
A location that an entity can be in. Examples of locations include a single machine
or a pool of machines, or a region within a given cloud.
See brooklyn.entity.trait.Startable#start(Collection).
Locations may not be Serializable in subsequent releases!
| Method Summary | ||
|---|---|---|
boolean |
containsLocation(Location potentialDescendent)
Answers true if this location equals or is an ancestor of the given location. |
|
Object |
findLocationProperty(String key)
Deprecated. since 0.5.0, use getConfig |
|
Map<String,Object> |
getAllConfig()
Returns all config set _at_ this location (not inherited) |
|
Collection<Location> |
getChildLocations()
Get the 'children' of this location. |
|
|
getConfig(ConfigKey<T> key)
Returns configuration set at this location or inherited |
|
String |
getId()
A unique id for this location. |
|
Object |
getLocationProperty(String key)
Deprecated. since 0.5.0, use `if (hasConfig) { getConfig }` if you really need to preserve "don't look at parents" behaviour |
|
String |
getName()
Get the name assigned to this location. |
|
Location |
getParentLocation()
Get the 'parent' of this location. |
|
boolean |
hasConfig(ConfigKey<?> key)
True iff the indication config key is set _at_ this location (not parents) |
|
boolean |
hasLocationProperty(String key)
Deprecated. since 0.5.0, use hasConfig |
|
void |
setParentLocation(Location newParent)
Set the 'parent' of this location. |
|
| Methods inherited from interface brooklyn.entity.rebind.Rebindable |
|---|
getRebindSupport |
| Method Detail |
|---|
String getId()
String getName()
Location getParentLocation()
null if this location is the tree root.
null if this location is the tree root.Collection<Location> getChildLocations()
void setParentLocation(Location newParent)
null to indicate that the location should be disconnected
from its parent.
Adds this location as a child of the new parent (see getChildLocations()).
newParent - the new parent location object, or null to clear the parent reference.boolean containsLocation(Location potentialDescendent)
<T> T getConfig(ConfigKey<T> key)
boolean hasConfig(ConfigKey<?> key)
Map<String,Object> getAllConfig()
@Deprecated boolean hasLocationProperty(String key)
true iff this location contains a property with the specified key. The
property's value can be obtained by calling getLocationProperty(java.lang.String). This method only interrogates the
immediate properties; the parent hierarchy is NOT searched in the event that the property is not found locally.
@Deprecated Object getLocationProperty(String key)
key. This method only interrogates the
immediate properties; the parent hierarchy is NOT searched in the event that the property is not found locally.
NOTE: must not name this method 'getProperty' as this will clash with the 'magic' Groovy's method of the same
name, at which point everything stops working!
@Deprecated Object findLocationProperty(String key)
getLocationProperty(java.lang.String), but if the property is not defined on this location, searches recursively up
the parent hierarchy until it is found, or the root is reached (when this method will return null).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||