|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ScheduleOptions
Scheduler options provide an extensible way of defining how to schedule a job. An option can be created via the scheduler.
| Method Summary | |
|---|---|
ScheduleOptions |
canRunConcurrently(boolean flag)
Flag indicating whether the job can be run concurrently. |
ScheduleOptions |
config(Map<String,Serializable> config)
Add optional configuration for the job. |
ScheduleOptions |
name(String name)
Sets the name of the job. |
ScheduleOptions |
onInstancesOnly(String[] slingIds)
List of Sling IDs this job should be run on. |
ScheduleOptions |
onLeaderOnly(boolean flag)
Flag indicating whether the job should only be run on the leader. |
ScheduleOptions |
onSingleInstanceOnly(boolean flag)
Flag indicating whether the job should only be run on a single instance in a cluster This defaults to false. |
| Method Detail |
|---|
ScheduleOptions config(Map<String,Serializable> config)
config - An optional configuration object - this configuration is only passed to the job the job implements Job.ScheduleOptions name(String name)
name - The job nameScheduleOptions canRunConcurrently(boolean flag)
flag - Whether this job can run even if previous scheduled runs are still running.ScheduleOptions onLeaderOnly(boolean flag)
onSingleInstanceOnly(boolean) or onInstancesOnly(String[]) has been called before,
that option is reset and overwritten by the value of this method.
flag - Whether this job should only be run on the leaderScheduleOptions onSingleInstanceOnly(boolean flag)
onLeaderOnly(boolean) or onInstancesOnly(String[]) has been called before,
that option is reset and overwritten by the value of this method.
flag - Whether this job should only be run on a single instance.ScheduleOptions onInstancesOnly(String[] slingIds)
onLeaderOnly(boolean) or onSingleInstanceOnly(boolean) has been called before,
that option is reset and overwritten by the value of this method.
slingIds - Array of Sling IDs this job should run on
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||