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.BasicSubscriptionSupportBrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupportConfigurable.ConfigurationSupportBrooklynObjectInternal.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, WAITHIGHLIGHT_NAME_LAST_ACTION, HIGHLIGHT_NAME_LAST_CONFIRMATION, HIGHLIGHT_NAME_LAST_VIOLATION, HIGHLIGHT_NAME_TRIGGERSNOOP| Constructor and Description |
|---|
PeriodicEffectorPolicy() |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
start() |
destroy, getExecutor, init, onEvent, rebind, resume, setEntity, setupgetPolicyType, getRebindSupport, isRunning, isSuspended, relations, suspend, toStringconfig, configure, getAdjunctType, getConfig, getDisplayName, getEntity, getExecutionContext, getHighlights, getManagementContext, getUniqueTag, isDestroyed, setDisplayName, setHighlights, subscriptions, tagsaddSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, setCatalogItemId, setCatalogItemIdAndSearchPath, setManagementContext, stackCatalogItemIdequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetHighlights, getUniqueTag, isDestroyedgetCatalogItemId, getCatalogItemIdSearchPath, getDisplayName, subscriptions, tagsconfig, getConfigaddSearchPath, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemIdpublic void start()
start in class AbstractScheduledEffectorPolicypublic void run()
run in interface java.lang.Runnablerun in class AbstractScheduledEffectorPolicy