public abstract class AbstractPolicy extends AbstractEntityAdjunct implements Policy, Configurable
Policy
implementation; all policies should extend this or its childrenAbstractEntityAdjunct.AdjunctTagSupport
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal
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
|
void |
resume()
Resume the policy
|
void |
suspend()
Suspend the policy
|
java.lang.String |
toString() |
config, configure, getAllConfig, getConfig, getConfigMap, getDisplayName, getName, getUniqueTag, isDestroyed, setConfig, setDisplayName, setEntity, setName, tags
getCatalogItemId, getId, getManagementContext, getTagSupport, init, rebind, setCatalogItemId, setManagementContext
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAllConfig, getConfig, getId, getName, setConfig
getUniqueTag, isDestroyed
getCatalogItemId, getDisplayName, getTagSupport, tags
config
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 BrooklynObjectInternal
getRebindSupport
in interface Rebindable
getRebindSupport
in interface Policy
public java.lang.String toString()
toString
in class AbstractEntityAdjunct