Brooklyn

brooklyn.management.internal
[Java] Class EntityManagementSupport

java.lang.Object
  brooklyn.management.internal.EntityManagementSupport

public class EntityManagementSupport

Encapsulates management activities at an entity.

On entity deployment, ManagementContext.manage(entity) causes

* onManagementStarting(ManagementContext) * onManagementStartingSubscriptions() * onManagementStartingSensorEmissions() * onManagementStartingExecutions() * onManagementStarted() - when all the above is said and done * onManagementStartingHere();

on unmanage it hits onManagementStoppingHere() then onManagementStopping().

When an entity's management migrates, it invoked onManagementStoppingHere() at the old location, then onManagementStartingHere() at the new location.


Field Summary
protected java.util.concurrent.atomic.AtomicBoolean currentlyDeployed

protected AbstractEntity entity

protected java.util.concurrent.atomic.AtomicBoolean everDeployed

protected ExecutionContext executionContext

protected ManagementContext initialManagementContext

protected ManagementContext managementContext

protected java.util.concurrent.atomic.AtomicBoolean managementContextUsable

protected java.util.concurrent.atomic.AtomicBoolean managementFailed

protected SubscriptionContext subscriptionContext

 
Constructor Summary
EntityManagementSupport(AbstractEntity entity)

 
Method Summary
void attemptLegacyAutodeployment(java.lang.String effectorName)

EntityChangeListener getEntityChangeListener()

ExecutionContext getExecutionContext()

ManagementContext getManagementContext()

SubscriptionContext getSubscriptionContext()

boolean isDeployed()

Whether this entity is managed (i.e.

boolean isFullyManaged()

Whether the entity's management lifecycle is complete (i.e. both "onManagementStarting" and "onManagementStarted" have been called, and it is has not been unmanaged).

boolean isManagementContextReal()

boolean isNoLongerManaged()

void onManagementStarted(ManagementTransitionInfo info)

void onManagementStarting(ManagementTransitionInfo info)

void onManagementStopped(ManagementTransitionInfo info)

void onManagementStopping(ManagementTransitionInfo info)

void onRebind(ManagementTransitionInfo info)

void setManagementContext(ManagementContextInternal val)

boolean wasDeployed()

 
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()
 

Field Detail

currentlyDeployed

protected final java.util.concurrent.atomic.AtomicBoolean currentlyDeployed


entity

protected AbstractEntity entity


everDeployed

protected final java.util.concurrent.atomic.AtomicBoolean everDeployed


executionContext

protected ExecutionContext executionContext


initialManagementContext

protected ManagementContext initialManagementContext


managementContext

protected ManagementContext managementContext


managementContextUsable

protected final java.util.concurrent.atomic.AtomicBoolean managementContextUsable


managementFailed

protected final java.util.concurrent.atomic.AtomicBoolean managementFailed


subscriptionContext

protected SubscriptionContext subscriptionContext


 
Constructor Detail

EntityManagementSupport

public EntityManagementSupport(AbstractEntity entity)


 
Method Detail

attemptLegacyAutodeployment

public void attemptLegacyAutodeployment(java.lang.String effectorName)


getEntityChangeListener

public EntityChangeListener getEntityChangeListener()


getExecutionContext

public ExecutionContext getExecutionContext()


getManagementContext

public ManagementContext getManagementContext()


getSubscriptionContext

public SubscriptionContext getSubscriptionContext()


isDeployed

public boolean isDeployed()
Whether this entity is managed (i.e. "onManagementStarting" has been called, so the framework knows about it, and it has not been unmanaged).


isFullyManaged

public boolean isFullyManaged()
Whether the entity's management lifecycle is complete (i.e. both "onManagementStarting" and "onManagementStarted" have been called, and it is has not been unmanaged).
Returns:


isManagementContextReal

@VisibleForTesting
@Beta
public boolean isManagementContextReal()


isNoLongerManaged

public boolean isNoLongerManaged()


onManagementStarted

public void onManagementStarted(ManagementTransitionInfo info)


onManagementStarting

public void onManagementStarting(ManagementTransitionInfo info)


onManagementStopped

public void onManagementStopped(ManagementTransitionInfo info)


onManagementStopping

public void onManagementStopping(ManagementTransitionInfo info)


onRebind

public void onRebind(ManagementTransitionInfo info)


setManagementContext

public void setManagementContext(ManagementContextInternal val)


wasDeployed

public boolean wasDeployed()


 

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