|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object brooklyn.entity.basic.Entities
public class Entities
Convenience methods for working with entities.
Also see the various *Methods classes for traits, such as StartableMethods for Startable implementations.
Method Summary | |
---|---|
static Supplier
|
attributeSupplier(Entity entity, AttributeSensor sensor)
|
static void
|
destroy(ManagementContext context, Entity e)
@deprecated since 0.4; use destroy(Entity) |
static void
|
destroy(Entity e)
stops, destroys, and unmanages the given entity -- does as many as are valid given the type and state |
static void
|
destroyAll(Application app)
stops, destroys, and unmanages the given application -- and terminates the mangaement context; does as many as are valid given the type and state |
static void
|
dumpInfo(java.lang.Iterable entities)
|
static void
|
dumpInfo(Entity e)
|
static void
|
dumpInfo(Entity e, java.io.Writer out)
|
static void
|
dumpInfo(Entity e, java.lang.String currentIndentation, java.lang.String tab)
|
static void
|
dumpInfo(Entity e, java.io.Writer out, java.lang.String currentIndentation, java.lang.String tab)
|
static void
|
dumpInfo(Location loc)
|
static void
|
dumpInfo(Location loc, java.io.Writer out)
|
static void
|
dumpInfo(Location loc, java.lang.String currentIndentation, java.lang.String tab)
|
static void
|
dumpInfo(Location loc, java.io.Writer out, java.lang.String currentIndentation, java.lang.String tab)
|
static void
|
dumpInfo(Policy pol)
|
static void
|
dumpInfo(Policy pol, java.io.Writer out)
|
static void
|
dumpInfo(Policy pol, java.lang.String currentIndentation, java.lang.String tab)
|
static void
|
dumpInfo(Policy pol, java.io.Writer out, java.lang.String currentIndentation, java.lang.String tab)
|
static Task
|
invokeEffector(EntityLocal callingEntity, Entity entityToCall, Effector effector)
|
static Task
|
invokeEffectorList(EntityLocal callingEntity, java.lang.Iterable entitiesToCall, Effector effector, java.util.Map parameters)
Invokes an Effector on multiple entities, with the named arguments from the parameters java.util.Map using the context of the provided Entity. |
static Task
|
invokeEffectorList(EntityLocal callingEntity, java.lang.Iterable entitiesToCall, Effector effector)
|
static Task
|
invokeEffectorListWithArgs(EntityLocal callingEntity, java.lang.Iterable entitiesToCall, Effector effector, java.lang.Object... args)
|
static Task
|
invokeEffectorListWithMap(EntityLocal callingEntity, java.lang.Iterable entitiesToCall, Effector effector, java.util.Map parameters)
|
static Task
|
invokeEffectorWithArgs(EntityLocal callingEntity, Entity entityToCall, Effector effector, java.lang.Object... args)
|
static Task
|
invokeEffectorWithMap(EntityLocal callingEntity, Entity entityToCall, Effector effector, java.util.Map parameters)
|
static void
|
invokeStopOnShutdown(Entity entity)
|
static boolean
|
isAncestor(Entity descendant, Entity potentialAncestor)
|
static boolean
|
isDescendant(Entity ancestor, Entity potentialDescendant)
note, it is usually preferred to use isAncestor() and swap the order, it is a cheaper method |
static boolean
|
isManaged(Entity e)
|
static boolean
|
isSecret(java.lang.String name)
|
static boolean
|
isTrivial(java.lang.Object v)
|
static boolean
|
manage(Entity e)
brings this entity under management iff its ancestor is managed, returns true in that case; otherwise returns false in the expectation that the ancestor will become managed, or throws exception if it has no parent or a non-application root (will throw if e is an Application; see also startManagement(Entity) ) |
static DownloadResolver
|
newDownloader(EntityDriver driver)
|
static ManagementContext
|
newManagementContext()
|
static ManagementContext
|
newManagementContext(BrooklynProperties props)
|
static ManagementContext
|
newManagementContext(java.util.Map props)
|
static java.util.Map
|
sanitize(java.util.Map input)
|
static java.util.List
|
sortConfigKeys(java.util.Set configs)
|
static java.util.Map
|
sortMap(java.util.Map map)
|
static java.util.List
|
sortSensors(java.util.Set sensors)
|
static Entity
|
start(ManagementContext context, Entity e, java.util.Collection locations)
@deprecated since 0.4; use start(Entity) |
static void
|
start(Entity e, java.util.Collection locations)
convenience for starting an entity, esp a new Startable instance which has been created dynamically (after the application is started) |
static ManagementContext
|
startManagement(Entity e)
brings this entity under management, creating a local management context if necessary (assuming root is an application). |
static ManagementContext
|
startManagement(Application app, ManagementContext mgmt)
Starts managing the given (unmanaged) app, using the given management context. |
static ManagementContext
|
startManagement(Application app, BrooklynProperties props)
Starts managing the given (unmanaged) app, setting the given brooklyn properties on the new management context. |
static void
|
unmanage(Entity entity)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Method Detail |
---|
public static Supplier attributeSupplier(Entity entity, AttributeSensor sensor)
public static void destroy(ManagementContext context, Entity e)
public static void destroy(Entity e)
public static void destroyAll(Application app)
public static void dumpInfo(java.lang.Iterable entities)
public static void dumpInfo(Entity e)
public static void dumpInfo(Entity e, java.io.Writer out)
public static void dumpInfo(Entity e, java.lang.String currentIndentation, java.lang.String tab)
public static void dumpInfo(Entity e, java.io.Writer out, java.lang.String currentIndentation, java.lang.String tab)
public static void dumpInfo(Location loc)
public static void dumpInfo(Location loc, java.io.Writer out)
public static void dumpInfo(Location loc, java.lang.String currentIndentation, java.lang.String tab)
@SuppressWarnings("rawtypes") public static void dumpInfo(Location loc, java.io.Writer out, java.lang.String currentIndentation, java.lang.String tab)
public static void dumpInfo(Policy pol)
public static void dumpInfo(Policy pol, java.io.Writer out)
public static void dumpInfo(Policy pol, java.lang.String currentIndentation, java.lang.String tab)
public static void dumpInfo(Policy pol, java.io.Writer out, java.lang.String currentIndentation, java.lang.String tab)
public static Task invokeEffector(EntityLocal callingEntity, Entity entityToCall, Effector effector)
public static Task invokeEffectorList(EntityLocal callingEntity, java.lang.Iterable entitiesToCall, Effector effector, java.util.Map parameters)
Intended for use only from the callingEntity.
Returns a ParallelTask containing the results from each tasks invocation. Calling java.util.concurrent.Future#get() get() on this will block until all tasks are complete, and will throw an exception if any task resulted in an error.
public static Task invokeEffectorList(EntityLocal callingEntity, java.lang.Iterable entitiesToCall, Effector effector)
@SuppressWarnings("unchecked") public static Task invokeEffectorListWithArgs(EntityLocal callingEntity, java.lang.Iterable entitiesToCall, Effector effector, java.lang.Object... args)
public static Task invokeEffectorListWithMap(EntityLocal callingEntity, java.lang.Iterable entitiesToCall, Effector effector, java.util.Map parameters)
public static Task invokeEffectorWithArgs(EntityLocal callingEntity, Entity entityToCall, Effector effector, java.lang.Object... args)
public static Task invokeEffectorWithMap(EntityLocal callingEntity, Entity entityToCall, Effector effector, java.util.Map parameters)
public static void invokeStopOnShutdown(Entity entity)
public static boolean isAncestor(Entity descendant, Entity potentialAncestor)
public static boolean isDescendant(Entity ancestor, Entity potentialDescendant)
public static boolean isManaged(Entity e)
public static boolean isSecret(java.lang.String name)
public static boolean isTrivial(java.lang.Object v)
public static boolean manage(Entity e)
public static DownloadResolver newDownloader(EntityDriver driver)
public static ManagementContext newManagementContext()
public static ManagementContext newManagementContext(BrooklynProperties props)
public static ManagementContext newManagementContext(java.util.Map props)
public static java.util.Map sanitize(java.util.Map input)
@SuppressWarnings({ "rawtypes", "unchecked" }) public static java.util.List sortConfigKeys(java.util.Set configs)
public static java.util.Map sortMap(java.util.Map map)
@SuppressWarnings({ "rawtypes", "unchecked" }) public static java.util.List sortSensors(java.util.Set sensors)
public static Entity start(ManagementContext context, Entity e, java.util.Collection locations)
public static void start(Entity e, java.util.Collection locations)
public static ManagementContext startManagement(Entity e)
callers are recommended to use manage(Entity) instead unless they know a plain-vanilla non-root management context is sufficient (e.g. in tests)
this method may change, but is provided as a stop-gap to prevent ad-hoc things being done in the code which are even more likely to break!
public static ManagementContext startManagement(Application app, ManagementContext mgmt)
public static ManagementContext startManagement(Application app, BrooklynProperties props)
public static void unmanage(Entity entity)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.