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 longstatic final TimeoutPolicystatic final Stringstatic final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractManagedScheduledJob(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.protectedAbstractManagedScheduledJob(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.protectedAbstractManagedScheduledJob(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 TypeMethodDescriptionbooleanbooleanbooleanbooleancom.atlassian.scheduler.config.JobConfigWhen 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.JobIdgetJobId()com.atlassian.scheduler.JobRunnerTheJobRunnerKeyto register theJobRunnerresult of this method should be taken from the result ofScheduledJob.getJobConfig().longinthashCode()booleanJobs that are only meaningful in clustered environment won't be scheduled in non-clustered environments.booleanbooleanbooleantoString()
-
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:
getJobIdin interfaceManagedScheduledJob
-
getJobRunner
public com.atlassian.scheduler.JobRunner getJobRunner()Description copied from interface:ScheduledJobTheJobRunnerKeyto register theJobRunnerresult of this method should be taken from the result ofScheduledJob.getJobConfig().- Specified by:
getJobRunnerin interfaceScheduledJob
-
getJobConfig
public com.atlassian.scheduler.config.JobConfig getJobConfig()Description copied from interface:ScheduledJobWhen scheduling the job,ScheduleUtil.withTimeZone(JobConfig, TimeZone)may be used to set the time zone in case the job is cron based.- Specified by:
getJobConfigin interfaceScheduledJob
-
isEditable
public boolean isEditable()- Specified by:
isEditablein interfaceManagedScheduledJob
-
isKeepingHistory
public boolean isKeepingHistory()- Specified by:
isKeepingHistoryin interfaceManagedScheduledJob
-
canRunAdhoc
public boolean canRunAdhoc()- Specified by:
canRunAdhocin interfaceManagedScheduledJob
-
canDisable
public boolean canDisable()- Specified by:
canDisablein interfaceManagedScheduledJob
-
isClusteredOnly
public boolean isClusteredOnly()Description copied from interface:ScheduledJobJobs that are only meaningful in clustered environment won't be scheduled in non-clustered environments.- Specified by:
isClusteredOnlyin interfaceScheduledJob
-
isLocalJob
public boolean isLocalJob()- Specified by:
isLocalJobin interfaceManagedScheduledJob
-
getLockWaitTime
public long getLockWaitTime()- Specified by:
getLockWaitTimein interfaceManagedScheduledJob
-
getTimeoutPolicy
- Specified by:
getTimeoutPolicyin interfaceManagedScheduledJob
-
disabledByDefault
public boolean disabledByDefault()- Specified by:
disabledByDefaultin interfaceManagedScheduledJob
-
toString
-
equals
-
hashCode
public int hashCode()
-