Module methanol

Interface Delayer


  • public interface Delayer
    Delays the execution of a given task.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static Delayer defaultDelayer()
      A Delayer that uses a library-wide scheduler.
      java.util.concurrent.CompletableFuture<java.lang.Void> delay​(java.lang.Runnable task, java.time.Duration delay, java.util.concurrent.Executor executor)
      Arranges for the task to be submitted to the given executor after the delay is evaluated.
      static Delayer of​(java.util.concurrent.ScheduledExecutorService scheduler)  
    • Method Detail

      • delay

        java.util.concurrent.CompletableFuture<java.lang.Void> delay​(java.lang.Runnable task,
                                                                     java.time.Duration delay,
                                                                     java.util.concurrent.Executor executor)
        Arranges for the task to be submitted to the given executor after the delay is evaluated.
      • defaultDelayer

        static Delayer defaultDelayer()
        A Delayer that uses a library-wide scheduler.
      • of

        static Delayer of​(java.util.concurrent.ScheduledExecutorService scheduler)