Interface IDaemonScheduler


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

      • enqueue

        boolean enqueue​(DaemonEntry entry,
                        long nDelay,
                        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,
                      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