|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.schedule.persistence.dao.ClusterSafeScheduledJobDao
@Internal public class ClusterSafeScheduledJobDao
Provides a partial implementation of ScheduledJobDao, and is a stripped-down version of
CachedScheduledJobDao.
The job configuration functions remain intact (using Bandana), but the job status and history functions have been stubbed
out due to their non-performant implementations in CachedScheduledJobDao.
The job status and history functions, however, have been stubbed out, as their use required a distributed cache for
consistentcy, but the performance was poor. Stubbing those functions out is the safer option, even though it effectively
means that those functions are not available in the Scheduler Admin UI.
| Constructor Summary | |
|---|---|
ClusterSafeScheduledJobDao(com.atlassian.bandana.BandanaManager bandanaManager)
|
|
| Method Summary | |
|---|---|
void |
addHistory(ScheduledJobKey key,
ScheduledJobHistory history,
Date nextOccurence,
boolean persistHistory)
Adds to an event to the history, and updates the nextOccurence in the ScheduledJobStatus. |
ScheduledJobConfiguration |
getScheduledJobConfiguration(ScheduledJobKey key)
Gets the job configuration for the specified job. |
String |
getScheduledJobDefaultCronExpression(ScheduledJobKey key)
Gets the default cron expression for the job. |
List<ScheduledJobHistory> |
getScheduledJobHistory(ScheduledJobKey key)
The the job history for a specified job. |
ScheduledJobStatus |
getScheduledJobStatus(ScheduledJobKey key)
Gets the specified job's status. |
void |
saveScheduledJobConfiguration(ScheduledJobKey key,
ScheduledJobConfiguration job)
Stores the job configuration. |
void |
saveScheduledJobDefaultCronExpression(ScheduledJobKey key,
String cronExpressionDefault)
Stores the default cron expression for a job. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClusterSafeScheduledJobDao(com.atlassian.bandana.BandanaManager bandanaManager)
| Method Detail |
|---|
public ScheduledJobStatus getScheduledJobStatus(ScheduledJobKey key)
ScheduledJobDao
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.
getScheduledJobStatus in interface ScheduledJobDaokey - the job key
public void saveScheduledJobStatus(ScheduledJobKey key,
ScheduledJobStatus status)
ScheduledJobDao
saveScheduledJobStatus in interface ScheduledJobDaokey - the job keystatus - stores the job status.
public void updateStatus(ScheduledJobKey key,
ExecutionStatus status)
ScheduledJobDao
updateStatus in interface ScheduledJobDao
public void addHistory(ScheduledJobKey key,
ScheduledJobHistory history,
Date nextOccurence,
boolean persistHistory)
ScheduledJobDao
addHistory in interface ScheduledJobDaokey - the job keyhistory - the event that occurrednextOccurence - the date that the job is expected to execute nextpersistHistory - true the history will be persisted
public void updateNextOccurence(ScheduledJobKey key,
Date nextOccurence)
ScheduledJobDao
updateNextOccurence in interface ScheduledJobDaokey - the job keynextOccurence - the date that the job is expected to execute nextpublic List<ScheduledJobHistory> getScheduledJobHistory(ScheduledJobKey key)
ScheduledJobDao
getScheduledJobHistory in interface ScheduledJobDaokey - the job key
public void saveScheduledJobConfiguration(ScheduledJobKey key,
ScheduledJobConfiguration job)
ScheduledJobDao
saveScheduledJobConfiguration in interface ScheduledJobDaokey - the job keyjob - the configurationpublic ScheduledJobConfiguration getScheduledJobConfiguration(ScheduledJobKey key)
ScheduledJobDao
getScheduledJobConfiguration in interface ScheduledJobDaokey - the job key
public void saveScheduledJobDefaultCronExpression(ScheduledJobKey key,
String cronExpressionDefault)
ScheduledJobDao
saveScheduledJobDefaultCronExpression in interface ScheduledJobDaokey - the job keypublic String getScheduledJobDefaultCronExpression(ScheduledJobKey key)
ScheduledJobDao
getScheduledJobDefaultCronExpression in interface ScheduledJobDaokey - the job key
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||