Class AbstractManagedScheduledJob
java.lang.Object
com.atlassian.confluence.schedule.AbstractManagedScheduledJob
- All Implemented Interfaces:
ManagedScheduledJob
,ScheduledJob
- Direct Known Subclasses:
ManagedScheduledCronJob
,ManagedScheduledSimpleJob
Implements common properties for various implementations of ManagedScheduledJob.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final TimeoutPolicy
static final String
static final String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractManagedScheduledJob
(String jobId, com.atlassian.scheduler.JobRunner jobRunner, com.atlassian.scheduler.config.JobConfig jobConfig, boolean editable, boolean keepingHistory, boolean canRunAdhoc, boolean canDisable, boolean clusteredOnly) For atlassian-scheduler.protected
AbstractManagedScheduledJob
(String jobId, com.atlassian.scheduler.JobRunner jobRunner, com.atlassian.scheduler.config.JobConfig jobConfig, boolean editable, boolean keepingHistory, boolean canRunAdhoc, boolean canDisable, boolean clusteredOnly, long lockWaitTime, @Nullable TimeoutPolicy timeoutPolicy) For atlassian-scheduler.protected
AbstractManagedScheduledJob
(String jobId, com.atlassian.scheduler.JobRunner jobRunner, com.atlassian.scheduler.config.JobConfig jobConfig, boolean editable, boolean keepingHistory, boolean canRunAdhoc, boolean canDisable, boolean clusteredOnly, long lockWaitTime, @Nullable TimeoutPolicy timeoutPolicy, boolean disabledByDefault) For atlassian-scheduler. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
com.atlassian.scheduler.config.JobConfig
When scheduling the job,ScheduleUtil.withTimeZone(JobConfig, TimeZone)
may be used to set the time zone in case the job is cron based.com.atlassian.scheduler.config.JobId
getJobId()
com.atlassian.scheduler.JobRunner
TheJobRunnerKey
to register theJobRunner
result of this method should be taken from the result ofScheduledJob.getJobConfig()
.long
int
hashCode()
boolean
Jobs that are only meaningful in clustered environment won't be scheduled in non-clustered environments.boolean
boolean
boolean
toString()
-
Field Details
-
DEFAULT_LOCK_WAIT_TIME_MS
public static final long DEFAULT_LOCK_WAIT_TIME_MS- See Also:
-
DEFAULT_TIMEOUT_POLICY
-
LOCK_WAIT_TIME_PARAMETER_NAME
- See Also:
-
TIMEOUT_POLICY_PARAMETER_NAME
- See Also:
-
-
Constructor Details
-
AbstractManagedScheduledJob
protected AbstractManagedScheduledJob(String jobId, com.atlassian.scheduler.JobRunner jobRunner, com.atlassian.scheduler.config.JobConfig jobConfig, boolean editable, boolean keepingHistory, boolean canRunAdhoc, boolean canDisable, boolean clusteredOnly) For atlassian-scheduler. -
AbstractManagedScheduledJob
protected AbstractManagedScheduledJob(String jobId, com.atlassian.scheduler.JobRunner jobRunner, com.atlassian.scheduler.config.JobConfig jobConfig, boolean editable, boolean keepingHistory, boolean canRunAdhoc, boolean canDisable, boolean clusteredOnly, long lockWaitTime, @Nullable TimeoutPolicy timeoutPolicy) For atlassian-scheduler. -
AbstractManagedScheduledJob
protected AbstractManagedScheduledJob(String jobId, com.atlassian.scheduler.JobRunner jobRunner, com.atlassian.scheduler.config.JobConfig jobConfig, boolean editable, boolean keepingHistory, boolean canRunAdhoc, boolean canDisable, boolean clusteredOnly, long lockWaitTime, @Nullable TimeoutPolicy timeoutPolicy, boolean disabledByDefault) For atlassian-scheduler.
-
-
Method Details
-
getJobId
public com.atlassian.scheduler.config.JobId getJobId()- Specified by:
getJobId
in interfaceManagedScheduledJob
-
getJobRunner
public com.atlassian.scheduler.JobRunner getJobRunner()Description copied from interface:ScheduledJob
TheJobRunnerKey
to register theJobRunner
result of this method should be taken from the result ofScheduledJob.getJobConfig()
.- Specified by:
getJobRunner
in interfaceScheduledJob
-
getJobConfig
public com.atlassian.scheduler.config.JobConfig getJobConfig()Description copied from interface:ScheduledJob
When scheduling the job,ScheduleUtil.withTimeZone(JobConfig, TimeZone)
may be used to set the time zone in case the job is cron based.- Specified by:
getJobConfig
in interfaceScheduledJob
-
isEditable
public boolean isEditable()- Specified by:
isEditable
in interfaceManagedScheduledJob
-
isKeepingHistory
public boolean isKeepingHistory()- Specified by:
isKeepingHistory
in interfaceManagedScheduledJob
-
canRunAdhoc
public boolean canRunAdhoc()- Specified by:
canRunAdhoc
in interfaceManagedScheduledJob
-
canDisable
public boolean canDisable()- Specified by:
canDisable
in interfaceManagedScheduledJob
-
isClusteredOnly
public boolean isClusteredOnly()Description copied from interface:ScheduledJob
Jobs that are only meaningful in clustered environment won't be scheduled in non-clustered environments.- Specified by:
isClusteredOnly
in interfaceScheduledJob
-
isLocalJob
public boolean isLocalJob()- Specified by:
isLocalJob
in interfaceManagedScheduledJob
-
getLockWaitTime
public long getLockWaitTime()- Specified by:
getLockWaitTime
in interfaceManagedScheduledJob
-
getTimeoutPolicy
- Specified by:
getTimeoutPolicy
in interfaceManagedScheduledJob
-
disabledByDefault
public boolean disabledByDefault()- Specified by:
disabledByDefault
in interfaceManagedScheduledJob
-
toString
-
equals
-
hashCode
public int hashCode()
-