public class SchedulerClusteredJobDaoProxyWrapper extends Object implements com.atlassian.scheduler.caesium.spi.ClusteredJobDao
See schedulingSubsystemContext.xml. This class uses
TransactionProxyFactoryBean
uses
SchedulerClusteredJobDao
.
We use TransactionProxyFactoryBean
to wrap SchedulerClusteredJobDao
. At create
and updateNextRunTime
,
when there's exception DataAccessException
(DataIntegrityViolationException
or
HibernateSystemException
), 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.
Constructor and Description |
---|
SchedulerClusteredJobDaoProxyWrapper(com.atlassian.scheduler.caesium.spi.ClusteredJobDao proxy) |
Modifier and Type | Method and 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) |
public SchedulerClusteredJobDaoProxyWrapper(com.atlassian.scheduler.caesium.spi.ClusteredJobDao proxy)
public @Nullable Date getNextRunTime(com.atlassian.scheduler.config.JobId jobId)
getNextRunTime
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public @Nullable Long getVersion(com.atlassian.scheduler.config.JobId jobId)
getVersion
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public @Nullable com.atlassian.scheduler.caesium.spi.ClusteredJob find(com.atlassian.scheduler.config.JobId jobId)
find
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public @NonNull Collection<com.atlassian.scheduler.caesium.spi.ClusteredJob> findByJobRunnerKey(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey)
findByJobRunnerKey
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public @NonNull Map<com.atlassian.scheduler.config.JobId,Date> refresh()
refresh
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public @NonNull Set<com.atlassian.scheduler.config.JobRunnerKey> findAllJobRunnerKeys()
findAllJobRunnerKeys
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public boolean create(com.atlassian.scheduler.caesium.spi.ClusteredJob clusteredJob)
create
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public boolean updateNextRunTime(com.atlassian.scheduler.config.JobId jobId, @Nullable Date nextRunTime, long expectedVersion)
updateNextRunTime
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public boolean delete(com.atlassian.scheduler.config.JobId jobId)
delete
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
Copyright © 2003–2020 Atlassian. All rights reserved.