Class 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 uses SchedulerClusteredJobDao.

    We use TransactionProxyFactoryBean to wrap SchedulerClusteredJobDao. At create and updateNextRunTime, when there's exception DataAccessException (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 Detail

      • SchedulerClusteredJobDaoProxyWrapper

        public SchedulerClusteredJobDaoProxyWrapper​(com.atlassian.scheduler.caesium.spi.ClusteredJobDao proxy)
    • Method Detail

      • getNextRunTime

        public @Nullable Date getNextRunTime​(com.atlassian.scheduler.config.JobId jobId)
        Specified by:
        getNextRunTime in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
      • getVersion

        public @Nullable Long getVersion​(com.atlassian.scheduler.config.JobId jobId)
        Specified by:
        getVersion in interface com.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 interface com.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 interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
      • refresh

        public @NonNull Map<com.atlassian.scheduler.config.JobId,​Date> refresh()
        Specified by:
        refresh in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
      • findAllJobRunnerKeys

        public @NonNull Set<com.atlassian.scheduler.config.JobRunnerKey> findAllJobRunnerKeys()
        Specified by:
        findAllJobRunnerKeys in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
      • create

        public boolean create​(com.atlassian.scheduler.caesium.spi.ClusteredJob clusteredJob)
        Specified by:
        create in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
      • updateNextRunTime

        public boolean updateNextRunTime​(com.atlassian.scheduler.config.JobId jobId,
                                         @Nullable Date nextRunTime,
                                         long expectedVersion)
        Specified by:
        updateNextRunTime in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao
      • delete

        public boolean delete​(com.atlassian.scheduler.config.JobId jobId)
        Specified by:
        delete in interface com.atlassian.scheduler.caesium.spi.ClusteredJobDao