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) |
com.atlassian.scheduler.caesium.spi.ClusteredJob |
find(com.atlassian.scheduler.config.JobId jobId) |
Set<com.atlassian.scheduler.config.JobRunnerKey> |
findAllJobRunnerKeys() |
Collection<com.atlassian.scheduler.caesium.spi.ClusteredJob> |
findByJobRunnerKey(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey) |
Date |
getNextRunTime(com.atlassian.scheduler.config.JobId jobId) |
Long |
getVersion(com.atlassian.scheduler.config.JobId jobId) |
Map<com.atlassian.scheduler.config.JobId,Date> |
refresh() |
boolean |
updateNextRunTime(com.atlassian.scheduler.config.JobId jobId,
Date nextRunTime,
long expectedVersion) |
public SchedulerClusteredJobDaoProxyWrapper(com.atlassian.scheduler.caesium.spi.ClusteredJobDao proxy)
@Nullable public Date getNextRunTime(com.atlassian.scheduler.config.JobId jobId)
getNextRunTime
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
@Nullable public Long getVersion(com.atlassian.scheduler.config.JobId jobId)
getVersion
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
@Nullable public com.atlassian.scheduler.caesium.spi.ClusteredJob find(com.atlassian.scheduler.config.JobId jobId)
find
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
@Nonnull public Collection<com.atlassian.scheduler.caesium.spi.ClusteredJob> findByJobRunnerKey(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey)
findByJobRunnerKey
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
@Nonnull public Map<com.atlassian.scheduler.config.JobId,Date> refresh()
refresh
in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
@Nonnull public 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–2017 Atlassian. All rights reserved.