Brooklyn

brooklyn.management
[Java] Interface EntityManager


public interface EntityManager

For managing and querying entities.


Method Summary
java.lang.Object createEntity(EntitySpec spec)

Creates a new (unmanaged) entity.

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

Convenience (particularly for groovy code) to create an entity.

java.util.Collection getEntities()

All entities under control of this management plane

Entity getEntity(java.lang.String id)

Returns the entity with the given identifier (may be a full instance, or a proxy to one which is remote)

EntityTypeRegistry getEntityTypeRegistry()

Returns the type registry, used to identify the entity implementation when instantiating an entity of a given type.

boolean isManaged(Entity entity)

whether the entity is under management by this management context

void manage(Entity e)

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

void unmanage(Entity e)

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

 

Method Detail

createEntity

public java.lang.Object createEntity(EntitySpec spec)
Creates a new (unmanaged) entity.
Parameters:
spec
Returns:
A proxy to the created entity (rather than the actual entity itself).


createEntity

public java.lang.Object createEntity(java.util.Map config, java.lang.Class type)
Convenience (particularly for groovy code) to create an entity. Equivalent to createEntity(EntitySpecs.spec(type).configure(config))
See Also:
createEntity(brooklyn.entity.proxying.EntitySpec)


getEntities

public java.util.Collection getEntities()
All entities under control of this management plane


getEntity

public Entity getEntity(java.lang.String id)
Returns the entity with the given identifier (may be a full instance, or a proxy to one which is remote)


getEntityTypeRegistry

public EntityTypeRegistry getEntityTypeRegistry()
Returns the type registry, used to identify the entity implementation when instantiating an entity of a given type.
See Also:
EntityManager.createEntity(EntitySpec)


isManaged

public boolean isManaged(Entity entity)
whether the entity is under management by this management context


manage

public void manage(Entity e)
Begins management for the given entity 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 an entity.


unmanage

public void unmanage(Entity e)
Causes the given entity and its children, recursively, to be removed from the management plane (for instance because the entity is no longer relevant)


 

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