brooklyn.policy
Interface Policy

All Superinterfaces:
EntityAdjunct, Identifiable, Rebindable

public interface Policy
extends EntityAdjunct, Rebindable

Policies implement actions and thus must be suspendable; policies should continue to evaluate their sensors and indicate their desired planned action even if they aren't invoking them


Method Summary
 Map<brooklyn.config.ConfigKey<?>,Object> getAllConfig()
           
<T> T
getConfig(brooklyn.config.ConfigKey<T> key)
           
 String getId()
          A unique id for this policy.
 String getName()
          Get the name assigned to this policy.
 PolicyType getPolicyType()
          Information about the type of this entity; analogous to Java's object.getClass.
 RebindSupport<PolicyMemento> getRebindSupport()
           
 boolean isSuspended()
          Whether the policy is suspended
 void resume()
          Resume the policy
<T> T
setConfig(brooklyn.config.ConfigKey<T> key, T val)
           
 void suspend()
          Suspend the policy
 
Methods inherited from interface brooklyn.policy.EntityAdjunct
isDestroyed, isRunning
 

Method Detail

getId

String getId()
A unique id for this policy.

Specified by:
getId in interface EntityAdjunct
Specified by:
getId in interface Identifiable

getName

String getName()
Get the name assigned to this policy.

Specified by:
getName in interface EntityAdjunct
Returns:
the name assigned to the policy.

getPolicyType

@Beta
PolicyType getPolicyType()
Information about the type of this entity; analogous to Java's object.getClass.


resume

void resume()
Resume the policy


suspend

void suspend()
Suspend the policy


isSuspended

boolean isSuspended()
Whether the policy is suspended


getConfig

<T> T getConfig(brooklyn.config.ConfigKey<T> key)

setConfig

<T> T setConfig(brooklyn.config.ConfigKey<T> key,
                T val)

getAllConfig

Map<brooklyn.config.ConfigKey<?>,Object> getAllConfig()

getRebindSupport

RebindSupport<PolicyMemento> getRebindSupport()
Specified by:
getRebindSupport in interface Rebindable


Copyright © 2013. All Rights Reserved.