public interface ScheduledJobDao
Persistence may be in memory, local cache, clustered cache or to a persistent store.
Intended storage (see implementations):
Modifier and Type | Method and Description |
---|---|
void |
addHistory(ScheduledJobKey key,
@Nullable ScheduledJobHistory history,
Date nextOccurrence)
Adds to an event to the history to the cache, and updates the nextOccurrence in the ScheduledJobStatus.
|
@Nullable ScheduledJobConfiguration |
getScheduledJobConfiguration(ScheduledJobKey key)
Gets the job configuration for the specified job.
|
@Nullable ScheduledJobStatus |
getScheduledJobStatus(ScheduledJobKey key)
Gets the specified job's status.
|
void |
saveScheduledJobConfiguration(ScheduledJobKey key,
ScheduledJobConfiguration jobConfiguration)
Stores the job configuration.
|
void |
saveScheduledJobStatus(ScheduledJobKey key,
ScheduledJobStatus status)
Stores the status for the specified job.
|
void |
updateNextOccurence(ScheduledJobKey key,
Date nextOccurence)
Updates the nextOccurence in the ScheduledJobStatus.
|
void |
updateStatus(ScheduledJobKey key,
ExecutionStatus status)
Updates the status in the corresponding ScheduledJobStatus for the job.
|
@Nullable ScheduledJobStatus getScheduledJobStatus(ScheduledJobKey key)
It's recommended that ScheduleJobStatusManager
be used for
access to a job's status, rather than this call directly. The manager handles cache expiry automatically.
key
- the job keyvoid saveScheduledJobStatus(ScheduledJobKey key, ScheduledJobStatus status)
key
- the job keystatus
- stores the job status.void updateStatus(ScheduledJobKey key, ExecutionStatus status)
{link #saveScheduledJobStatus} should be called first, otherwise the update will be ignored.
void addHistory(ScheduledJobKey key, @Nullable ScheduledJobHistory history, Date nextOccurrence)
key
- the job keyhistory
- the event that occurrednextOccurrence
- the date that the job is expected to execute nextvoid updateNextOccurence(ScheduledJobKey key, Date nextOccurence)
key
- the job keynextOccurence
- the date that the job is expected to execute nextvoid saveScheduledJobConfiguration(ScheduledJobKey key, ScheduledJobConfiguration jobConfiguration)
key
- the job keyjobConfiguration
- the configuration@Nullable ScheduledJobConfiguration getScheduledJobConfiguration(ScheduledJobKey key)
key
- the job keyCopyright © 2003–2020 Atlassian. All rights reserved.