Class Async

java.lang.Object
com.github.benmanes.caffeine.cache.Async

final class Async extends Object
Static utility methods and classes pertaining to asynchronous operations.
  • Constructor Details

    • Async

      private Async()
  • Method Details

    • isReady

      static boolean isReady(@Nullable CompletableFuture<?> future)
      Returns if the future has successfully completed.
    • getIfReady

      @Nullable static <V> V getIfReady(@Nullable CompletableFuture<V> future)
      Returns the current value or null if either not done or failed.
    • getWhenSuccessful

      @Nullable static <V> V getWhenSuccessful(@Nullable CompletableFuture<V> future)
      Returns the value when completed successfully or null if failed.