Class FutureAsyncTimeout<T>


  • public class FutureAsyncTimeout<T>
    extends java.lang.Object
    see http://www.nurkiewicz.com/2014/12/asynchronous-timeouts-with.html
    • Constructor Summary

      Constructors 
      Constructor Description
      FutureAsyncTimeout​(java.util.function.Function<java.util.concurrent.TimeoutException,​T> failure, java.util.concurrent.ScheduledExecutorService scheduledExecutorService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void shutdown()  
      java.util.concurrent.CompletableFuture<T> within​(java.util.concurrent.CompletableFuture<T> future, java.time.Duration duration)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FutureAsyncTimeout

        public FutureAsyncTimeout​(java.util.function.Function<java.util.concurrent.TimeoutException,​T> failure,
                                  java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
    • Method Detail

      • within

        public java.util.concurrent.CompletableFuture<T> within​(java.util.concurrent.CompletableFuture<T> future,
                                                                java.time.Duration duration)
      • shutdown

        public void shutdown()