Class FileTimerPersistence

    • Constructor Detail

      • FileTimerPersistence

        public FileTimerPersistence​(boolean createIfNotExists,
                                    String path,
                                    String pathRelativeTo)
    • Method Detail

      • start

        public void start​(org.jboss.msc.service.StartContext context)
        Specified by:
        start in interface org.jboss.msc.Service
        Specified by:
        start in interface org.jboss.msc.service.Service<FileTimerPersistence>
      • stop

        public void stop​(org.jboss.msc.service.StopContext context)
        Specified by:
        stop in interface org.jboss.msc.Service
        Specified by:
        stop in interface org.jboss.msc.service.Service<FileTimerPersistence>
      • addTimer

        public void addTimer​(TimerImpl TimerImpl)
        Description copied from interface: TimerPersistence
        Called when a timer is being persisted. In a clustered environment, if an auto timer has already been persisted by another concurrent node, it should not be persisted again, and its state should be set to CANCELED.
        Specified by:
        addTimer in interface TimerPersistence
        Parameters:
        TimerImpl - The timer
      • shouldRun

        public boolean shouldRun​(TimerImpl timer)
        Description copied from interface: TimerPersistence
        Invoked before running a timer in order to determine if this node should run the timer.
        Specified by:
        shouldRun in interface TimerPersistence
        Parameters:
        timer - The timer
        Returns:
        true if the timer should be run
      • timerUndeployed

        public void timerUndeployed​(String timedObjectId)
        Description copied from interface: TimerPersistence
        Signals that a timer is being undeployed, and all cached data relating to this object should be dropped to prevent a class loader leak
        Specified by:
        timerUndeployed in interface TimerPersistence
      • loadActiveTimers

        public List<TimerImpl> loadActiveTimers​(String timedObjectId,
                                                TimerServiceImpl timerService)
        Description copied from interface: TimerPersistence
        Load all active timers for the given object. If the object is an entity bean timers for all beans will be returned.
        Specified by:
        loadActiveTimers in interface TimerPersistence
        Parameters:
        timedObjectId - The timed object id to load timers for
        Returns:
        A list of all active timers
      • getTransactionSynchronizationRegistry

        public org.jboss.msc.value.InjectedValue<jakarta.transaction.TransactionSynchronizationRegistry> getTransactionSynchronizationRegistry()
      • getModuleLoader

        public org.jboss.msc.value.InjectedValue<org.jboss.modules.ModuleLoader> getModuleLoader()
      • getPathManager

        public org.jboss.msc.value.InjectedValue<org.jboss.as.controller.services.path.PathManager> getPathManager()