Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for Scheduled and PeriodicEffectorPolicy #213

Merged
merged 2 commits into from
Sep 16, 2017

Conversation

drigodwin
Copy link
Member

Copy link
Member

@tbouron tbouron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Very minor comments, feel free to ignore.


- org.apache.brooklyn.policy.action.ScheduledEffectorPolicy

The ScheduledEffectorPolicy calls an effector with a set of arguments at a specified time and date. The following example
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would wrap ScheduledEffectorPolicy in ``


- org.apache.brooklyn.policy.action.PeriodicEffectorPolicy

The PeriodicEffectorPolicy calls an effector after a specified interval has expired. The interval can be triggered from a sensor, `SERVICE_UP` by default.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above but for PeriodicEffectorPolicy

- org.apache.brooklyn.policy.action.PeriodicEffectorPolicy

The PeriodicEffectorPolicy calls an effector after a specified interval has expired. The interval can be triggered from a sensor, `SERVICE_UP` by default.
The following example calls a backup effector every day.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above but for backup (effector)

- org.apache.brooklyn.policy.action.ScheduledEffectorPolicy

The ScheduledEffectorPolicy calls an effector with a set of arguments at a specified time and date. The following example
calls a resize effector to resize a cluster up to 10 members at 8am and then down to 1 member at 6pm.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above but for resize (effector)

- type: org.apache.brooklyn.policy.action.PeriodicEffectorPolicy
brooklyn.config:
effector: backup
period: 1d
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it on purpose that the period value is different than the example above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both are valid I think, I'll make them the same though

Copy link
Member

@grkvlt grkvlt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

- org.apache.brooklyn.policy.action.PeriodicEffectorPolicy

The `PeriodicEffectorPolicy` calls an effector with a set of arguments at a specified time and date. The following example
calls a `resize` effector to resize a cluster up to 10 members at 8am and then down to 1 member at 6pm.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this text:

The policy monitors the sensor configured as start.sensor and will only start when this is set to true. The default sensor checked is service.isUp, so that the policy will not execute the effector until the entity is started.


- org.apache.brooklyn.policy.action.ScheduledEffectorPolicy

The `ScheduledEffectorPolicy` calls an effector after a specified interval has expired. The interval can be triggered from a sensor, `SERVICE_UP` by default.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to:

The ScheduledEffectorPolicy calls an effector at a specific time, waiting until the entity is ready using the same mechanism as the PeriodicEffectorPolicy. There are two modes of operation, one based solely on policy configuration where the effector will execute at the time set using the time key or after the duration set using the wait key, or by monitoring sensors. The policy monitors the scheduler.invoke.now sensor and will execute the effector immediately when its value changes to true. When the scheduler.invoke.at sensor changes, it will set a time in the future when the effector should be executed.

@grkvlt
Copy link
Member

grkvlt commented Sep 15, 2017

LGTM @drigodwin

@drigodwin
Copy link
Member Author

Merging as brooklyn-server#822 is merged

@asfgit asfgit merged commit b0d1434 into apache:master Sep 16, 2017
asfgit pushed a commit that referenced this pull request Sep 16, 2017
@drigodwin drigodwin deleted the add-periodic-policy-docs branch September 16, 2017 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants