Interface CancelableSchedulerAbstraction

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface CancelableSchedulerAbstraction
    Scheduling interface which provides a command to cancel a scheduled task.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Runnable schedule​(java.lang.Runnable task, long timeout, java.util.concurrent.TimeUnit unit)
      Schedule a task to run after a timeout.
    • Method Detail

      • schedule

        java.lang.Runnable schedule​(java.lang.Runnable task,
                                    long timeout,
                                    java.util.concurrent.TimeUnit unit)
        Schedule a task to run after a timeout.
        Returns:
        a Runnable that will cancel the scheduled task