Class SchedulerClusteredJobDaoProxyWrapper
- java.lang.Object
-
- com.atlassian.confluence.impl.schedule.caesium.SchedulerClusteredJobDaoProxyWrapper
-
- All Implemented Interfaces:
com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public class SchedulerClusteredJobDaoProxyWrapper extends Object implements com.atlassian.scheduler.caesium.spi.ClusteredJobDao
See schedulingSubsystemContext.xml. This class uses
TransactionProxyFactoryBean
usesSchedulerClusteredJobDao
.We use
TransactionProxyFactoryBean
to wrapSchedulerClusteredJobDao
. Atcreate
andupdateNextRunTime
, when there's exceptionDataAccessException
(DataIntegrityViolationException
, even when we catch the exception, the proxy somehow still knows that the exception has occurred, and it rethrows the exception outside. Caesium doesn't like that, so we use this wrapper to catch the exception.- Since:
- 5.10
-
-
Constructor Summary
Constructors Constructor Description SchedulerClusteredJobDaoProxyWrapper(com.atlassian.scheduler.caesium.spi.ClusteredJobDao proxy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
create(com.atlassian.scheduler.caesium.spi.ClusteredJob clusteredJob)
boolean
delete(com.atlassian.scheduler.config.JobId jobId)
@Nullable com.atlassian.scheduler.caesium.spi.ClusteredJob
find(com.atlassian.scheduler.config.JobId jobId)
@NonNull Set<com.atlassian.scheduler.config.JobRunnerKey>
findAllJobRunnerKeys()
@NonNull Collection<com.atlassian.scheduler.caesium.spi.ClusteredJob>
findByJobRunnerKey(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey)
@Nullable Date
getNextRunTime(com.atlassian.scheduler.config.JobId jobId)
@Nullable Long
getVersion(com.atlassian.scheduler.config.JobId jobId)
@NonNull Map<com.atlassian.scheduler.config.JobId,Date>
refresh()
boolean
updateNextRunTime(com.atlassian.scheduler.config.JobId jobId, @Nullable Date nextRunTime, long expectedVersion)
-
-
-
Method Detail
-
getNextRunTime
public @Nullable Date getNextRunTime(com.atlassian.scheduler.config.JobId jobId)
- Specified by:
getNextRunTime
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
getVersion
public @Nullable Long getVersion(com.atlassian.scheduler.config.JobId jobId)
- Specified by:
getVersion
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
find
public @Nullable com.atlassian.scheduler.caesium.spi.ClusteredJob find(com.atlassian.scheduler.config.JobId jobId)
- Specified by:
find
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
findByJobRunnerKey
public @NonNull Collection<com.atlassian.scheduler.caesium.spi.ClusteredJob> findByJobRunnerKey(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey)
- Specified by:
findByJobRunnerKey
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
refresh
public @NonNull Map<com.atlassian.scheduler.config.JobId,Date> refresh()
- Specified by:
refresh
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
findAllJobRunnerKeys
public @NonNull Set<com.atlassian.scheduler.config.JobRunnerKey> findAllJobRunnerKeys()
- Specified by:
findAllJobRunnerKeys
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
create
public boolean create(com.atlassian.scheduler.caesium.spi.ClusteredJob clusteredJob)
- Specified by:
create
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
updateNextRunTime
public boolean updateNextRunTime(com.atlassian.scheduler.config.JobId jobId, @Nullable Date nextRunTime, long expectedVersion)
- Specified by:
updateNextRunTime
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
delete
public boolean delete(com.atlassian.scheduler.config.JobId jobId)
- Specified by:
delete
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
-