public abstract class AbstractPolicy extends AbstractEntityAdjunct implements Policy, Configurable
Policy
implementation; all policies should extend this or its childrenAbstractEntityAdjunct.AdjunctTagSupport, AbstractEntityAdjunct.BasicSubscriptionSupport
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
Constructor and Description |
---|
AbstractPolicy() |
AbstractPolicy(java.util.Map<?,?> flags) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Unsubscribes and clears all managed subscriptions; is called by the owning entity when a policy is removed
and should always be called by any subclasses overriding this method
|
PolicyType |
getPolicyType()
Information about the type of this entity; analogous to Java's object.getClass.
|
RebindSupport<PolicyMemento> |
getRebindSupport()
Users are strongly discouraged from calling or overriding this method.
|
boolean |
isRunning()
Whether the adjunct is available/active, ie started and not stopped or interrupted
|
boolean |
isSuspended()
Whether the policy is suspended
|
BrooklynObjectInternal.RelationSupportInternal<Policy> |
relations()
Relations specify a typed, directed connection between two entities.
|
void |
resume()
Resume the policy
|
void |
suspend()
Suspend the policy
|
java.lang.String |
toString() |
config, configure, getAdjunctType, getConfig, getConfigMap, getDisplayName, getUniqueTag, isDestroyed, setConfig, setDisplayName, setEntity, subscribe, subscribeToChildren, subscribeToMembers, subscriptions, tags, unsubscribe, unsubscribe
getCatalogItemId, getId, getManagementContext, init, rebind, setCatalogItemId, setManagementContext
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getUniqueTag, isDestroyed
getCatalogItemId, getDisplayName, subscriptions, tags
config, getConfig
setCatalogItemId
public AbstractPolicy()
public AbstractPolicy(java.util.Map<?,?> flags)
public PolicyType getPolicyType()
Policy
getPolicyType
in interface Policy
public void suspend()
Policy
public void resume()
Policy
public boolean isSuspended()
Policy
isSuspended
in interface Policy
public void destroy()
AbstractEntityAdjunct
destroy
in class AbstractEntityAdjunct
public boolean isRunning()
EntityAdjunct
isRunning
in interface EntityAdjunct
isRunning
in class AbstractEntityAdjunct
public RebindSupport<PolicyMemento> getRebindSupport()
Policy
getRebindSupport
in interface Rebindable
getRebindSupport
in interface Policy
getRebindSupport
in interface BrooklynObjectInternal
public BrooklynObjectInternal.RelationSupportInternal<Policy> relations()
BrooklynObject
relations
in interface BrooklynObject
relations
in interface Policy
relations
in interface BrooklynObjectInternal
relations
in class AbstractBrooklynObject
public java.lang.String toString()
toString
in class AbstractEntityAdjunct