public abstract class AbstractPolicy extends AbstractEntityAdjunct implements Policy, Configurable
Policy implementation; all policies should extend this or its childrenAbstractEntityAdjunct.AdjunctTagSupport, AbstractEntityAdjunct.BasicSubscriptionSupportBrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupportConfigurable.ConfigurationSupportBrooklynObjectInternal.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, unsubscribegetCatalogItemId, getId, getManagementContext, init, rebind, setCatalogItemId, setManagementContextequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUniqueTag, isDestroyedgetCatalogItemId, getDisplayName, subscriptions, tagsconfig, getConfigsetCatalogItemIdpublic AbstractPolicy()
public AbstractPolicy(java.util.Map<?,?> flags)
public PolicyType getPolicyType()
PolicygetPolicyType in interface Policypublic void suspend()
Policypublic void resume()
Policypublic boolean isSuspended()
PolicyisSuspended in interface Policypublic void destroy()
AbstractEntityAdjunctdestroy in class AbstractEntityAdjunctpublic boolean isRunning()
EntityAdjunctisRunning in interface EntityAdjunctisRunning in class AbstractEntityAdjunctpublic RebindSupport<PolicyMemento> getRebindSupport()
PolicygetRebindSupport in interface RebindablegetRebindSupport in interface PolicygetRebindSupport in interface BrooklynObjectInternalpublic BrooklynObjectInternal.RelationSupportInternal<Policy> relations()
BrooklynObjectrelations in interface BrooklynObjectrelations in interface Policyrelations in interface BrooklynObjectInternalrelations in class AbstractBrooklynObjectpublic java.lang.String toString()
toString in class AbstractEntityAdjunct