Package com.atlassian.crowd.scheduling
Class ClusterJobDAODecorator
java.lang.Object
com.atlassian.crowd.scheduling.ClusterJobDAODecorator
- All Implemented Interfaces:
com.atlassian.scheduler.caesium.spi.ClusteredJobDao
public class ClusterJobDAODecorator
extends Object
implements com.atlassian.scheduler.caesium.spi.ClusteredJobDao
Handles conversion between Crowd's InternalClusterJob and Caesium's ClusteredJobs.
-
Constructor Summary
ConstructorDescriptionClusterJobDAODecorator
(ClusterJobDAOHibernate dao, Supplier<String> nodeIdSupplier) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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>
Collection<com.atlassian.scheduler.caesium.spi.ClusteredJob>
findByJobRunnerKey
(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey) getNextRunTime
(com.atlassian.scheduler.config.JobId jobId) getVersion
(com.atlassian.scheduler.config.JobId jobId) refresh()
boolean
updateNextRunTime
(com.atlassian.scheduler.config.JobId jobId, Date nextRunTime, long expectedVersion) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
findByJobRunnerKeys
-
Constructor Details
-
ClusterJobDAODecorator
-
-
Method Details
-
getNextRunTime
- Specified by:
getNextRunTime
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
getVersion
- Specified by:
getVersion
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
find
@Nullable public com.atlassian.scheduler.caesium.spi.ClusteredJob find(com.atlassian.scheduler.config.JobId jobId) - Specified by:
find
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
findByJobRunnerKey
@Nonnull public 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
- Specified by:
refresh
in interfacecom.atlassian.scheduler.caesium.spi.ClusteredJobDao
-
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
-