Class AsyncUtils


  • public final class AsyncUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.concurrent.CompletableFuture<T> failableFuture​(java.util.concurrent.Callable<T> action, java.util.concurrent.Executor executor)  
      static <T> java.util.concurrent.CompletableFuture<T> failedFuture​(java.lang.Throwable ex)  
      static <T> java.util.function.Supplier<T> memoizedSupplier​(java.util.function.Supplier<T> input)  
      • Methods inherited from class java.lang.Object

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

      • failedFuture

        public static <T> java.util.concurrent.CompletableFuture<T> failedFuture​(java.lang.Throwable ex)
      • failableFuture

        public static <T> java.util.concurrent.CompletableFuture<T> failableFuture​(java.util.concurrent.Callable<T> action,
                                                                                   java.util.concurrent.Executor executor)
      • memoizedSupplier

        public static <T> java.util.function.Supplier<T> memoizedSupplier​(java.util.function.Supplier<T> input)