Interface IDaemonScheduler


  • public interface IDaemonScheduler
    Daemon scheduler. Responsible for ensuring on demand or timely daemon execution.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BEAN_NAME
      The bean name
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean enqueue​(DaemonEntry entry, long nDelay, java.util.concurrent.TimeUnit unit)
      Enqueue a daemon for execution in the immediate future
      void schedule​(DaemonEntry entry, long nInitialDelay, java.util.concurrent.TimeUnit unit)
      Schedule a daemon execution.
      void shutdown()
      Perform an orderly shutdown, stopping daemon execution
      void unSchedule​(DaemonEntry daemonEntry)
      Unschedule a daemon
    • Method Detail

      • enqueue

        boolean enqueue​(DaemonEntry entry,
                        long nDelay,
                        java.util.concurrent.TimeUnit unit)
        Enqueue a daemon for execution in the immediate future
        Parameters:
        entry - the daemon entry
        unit - the delay before execution
        nDelay - the unit of nDelay argument
        Returns:
        true if the daemon was successfully queued, false otherwise, for instance if the underlying queue is over capacity
      • schedule

        void schedule​(DaemonEntry entry,
                      long nInitialDelay,
                      java.util.concurrent.TimeUnit unit)
        Schedule a daemon execution.
        Parameters:
        entry - the daemon entry
        nInitialDelay - the initial delay before the first execution
        unit - the unit of nInitialDelay argument
        See Also:
        DaemonEntry.getInterval()
      • unSchedule

        void unSchedule​(DaemonEntry daemonEntry)
        Unschedule a daemon
        Parameters:
        entry - the daemon entry
      • shutdown

        void shutdown()
        Perform an orderly shutdown, stopping daemon execution