public class PeriodicEffectorPolicy extends AbstractScheduledEffectorPolicy
Policy
that executes an Effector
at specific intervals.
The following example shows a pair of policies that resize a cluster from one to ten entities during the day and back to one at night,:
brooklyn.policies:
- type: org.apache.brooklyn.policy.action.PeriodicEffectorPolicy
brooklyn.config:
effector: resize
args:
desiredSize: 10
period: 1 day
time: 08:00:00
- type: org.apache.brooklyn.policy.action.PeriodicEffectorPolicy
brooklyn.config:
effector: resize
args:
desiredSize: 1
period: 1 day
time: 18:00:00
AbstractEntityAdjunct.AdjunctTagSupport, AbstractEntityAdjunct.BasicSubscriptionSupport
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
Modifier and Type | Field and Description |
---|---|
static ConfigKey<Duration> |
PERIOD |
EFFECTOR, EFFECTOR_ARGUMENTS, IMMEDIATELY, NOW, RUNNING, SCHEDULED, START_SENSOR, TIME, TIME_FORMAT, WAIT
HIGHLIGHT_NAME_LAST_ACTION, HIGHLIGHT_NAME_LAST_CONFIRMATION, HIGHLIGHT_NAME_LAST_VIOLATION, HIGHLIGHT_NAME_TRIGGERS
NOOP
Constructor and Description |
---|
PeriodicEffectorPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
run() |
void |
start() |
destroy, getExecutor, init, onEvent, rebind, resume, setEntity, setup
getPolicyType, getRebindSupport, isRunning, isSuspended, relations, suspend, toString
config, configure, getAdjunctType, getConfig, getDisplayName, getEntity, getExecutionContext, getHighlights, getManagementContext, getUniqueTag, isDestroyed, setDisplayName, setHighlights, subscriptions, tags
addSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, setCatalogItemId, setCatalogItemIdAndSearchPath, setManagementContext, stackCatalogItemId
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getHighlights, getUniqueTag, isDestroyed
getCatalogItemId, getCatalogItemIdSearchPath, getDisplayName, subscriptions, tags
config, getConfig
addSearchPath, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId
public void start()
start
in class AbstractScheduledEffectorPolicy
public void run()
run
in interface java.lang.Runnable
run
in class AbstractScheduledEffectorPolicy