@ProviderType
public interface ScheduleOptions
Modifier and Type | Method and Description |
---|---|
ScheduleOptions |
canRunConcurrently(boolean flag)
Flag indicating whether the job can be run concurrently.
|
ScheduleOptions |
config(java.util.Map<java.lang.String,java.io.Serializable> config)
Add optional configuration for the job.
|
ScheduleOptions |
name(java.lang.String name)
Sets the name of the job.
|
ScheduleOptions |
onInstancesOnly(java.lang.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.
|
ScheduleOptions |
threadPoolName(java.lang.String name)
Define the thread pool to be used.
|
ScheduleOptions config(java.util.Map<java.lang.String,java.io.Serializable> config)
config
- An optional configuration object - this configuration is only passed to the job the job implements Job
.ScheduleOptions name(java.lang.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(java.lang.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 onScheduleOptions threadPoolName(java.lang.String name)
name
- The thread pool nameCopyright © 2018 The Apache Software Foundation. All rights reserved.