public class NonDeploymentEntityManager extends java.lang.Object implements EntityManagerInternal
Constructor and Description |
---|
NonDeploymentEntityManager(ManagementContext initialManagementContext) |
Modifier and Type | Method and Description |
---|---|
<T extends Enricher> |
createEnricher(EnricherSpec<T> spec)
Creates a new enricher (not managed; not associated with any entity).
|
<T extends Entity> |
createEntity(EntitySpec<T> spec)
Creates a new (unmanaged) entity.
|
<T extends Entity> |
createEntity(java.util.Map<?,?> config,
java.lang.Class<T> type)
Convenience (particularly for groovy code) to create an entity.
|
<T extends Policy> |
createPolicy(PolicySpec<T> spec)
Creates a new policy (not managed; not associated with any entity).
|
java.util.Collection<Entity> |
findEntities(com.google.common.base.Predicate<? super Entity> filter)
All entities under control of this management plane that match the given filter
|
java.util.Collection<Entity> |
findEntitiesInApplication(Application application,
com.google.common.base.Predicate<? super Entity> filter)
All entities managed as part of the given application that match the given filter
|
java.lang.Iterable<Entity> |
getAllEntitiesInApplication(Application application)
gets all entities currently known to the application, including entities that are not yet managed
|
java.util.Collection<Entity> |
getEntities()
All entities under control of this management plane
|
java.util.Collection<Entity> |
getEntitiesInApplication(Application application)
All entities managed as part of the given application
|
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),
or null.
|
java.lang.Iterable<java.lang.String> |
getEntityIds() |
EntityTypeRegistry |
getEntityTypeRegistry()
Returns the type registry, used to identify the entity implementation when instantiating an
entity of a given type.
|
ManagementTransitionMode |
getLastManagementTransitionMode(java.lang.String itemId) |
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 |
manageRebindedRoot(Entity 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(Entity item,
ManagementTransitionMode mode) |
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)
|
void |
unmanage(Entity e,
ManagementTransitionMode info) |
public NonDeploymentEntityManager(ManagementContext initialManagementContext)
public EntityTypeRegistry getEntityTypeRegistry()
EntityManager
getEntityTypeRegistry
in interface EntityManager
EntityManager.createEntity(EntitySpec)
public <T extends Entity> T createEntity(EntitySpec<T> spec)
EntityManager
createEntity
in interface EntityManager
public <T extends Entity> T createEntity(java.util.Map<?,?> config, java.lang.Class<T> type)
EntityManager
createEntity(EntitySpec.create(type).configure(config))
createEntity
in interface EntityManager
EntityManager.createEntity(EntitySpec)
public <T extends Policy> T createPolicy(PolicySpec<T> spec)
EntityManager
createPolicy
in interface EntityManager
public <T extends Enricher> T createEnricher(EnricherSpec<T> spec)
EntityManager
createEnricher
in interface EntityManager
public java.util.Collection<Entity> getEntities()
EntityManager
getEntities
in interface EntityManager
public java.util.Collection<Entity> getEntitiesInApplication(Application application)
EntityManager
getEntitiesInApplication
in interface EntityManager
public java.util.Collection<Entity> findEntities(com.google.common.base.Predicate<? super Entity> filter)
EntityManager
findEntities
in interface EntityManager
public java.util.Collection<Entity> findEntitiesInApplication(Application application, com.google.common.base.Predicate<? super Entity> filter)
EntityManager
findEntitiesInApplication
in interface EntityManager
public Entity getEntity(java.lang.String id)
EntityManager
getEntity
in interface EntityManager
public java.lang.Iterable<java.lang.String> getEntityIds()
getEntityIds
in interface EntityManagerInternal
public ManagementTransitionMode getLastManagementTransitionMode(java.lang.String itemId)
getLastManagementTransitionMode
in interface BrooklynObjectManagerInternal<Entity>
public void setManagementTransitionMode(Entity item, ManagementTransitionMode mode)
setManagementTransitionMode
in interface BrooklynObjectManagerInternal<Entity>
public boolean isManaged(Entity entity)
EntityManager
isManaged
in interface EntityManager
public void manage(Entity e)
EntityManager
manage
in interface EntityManager
public void unmanage(Entity e, ManagementTransitionMode info)
unmanage
in interface BrooklynObjectManagerInternal<Entity>
public void manageRebindedRoot(Entity item)
BrooklynObjectManagerInternal
#setReadOnly(T, boolean)
should be called prior to this.manageRebindedRoot
in interface BrooklynObjectManagerInternal<Entity>
public void unmanage(Entity e)
EntityManager
unmanage
in interface EntityManager
public java.lang.Iterable<Entity> getAllEntitiesInApplication(Application application)
EntityManagerInternal
getAllEntitiesInApplication
in interface EntityManagerInternal