Class Async
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.Async
-
final class Async extends java.lang.ObjectStatic utility methods and classes pertaining to asynchronous operations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classAsync.AsyncRemovalListener<K,V>A removal listener that asynchronously forwards the value stored in aCompletableFutureif successful to the user-supplied removal listener.(package private) static classAsync.AsyncWeigher<K,V>A weigher for asynchronous computations.
-
Constructor Summary
Constructors Modifier Constructor Description privateAsync()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static <V> VgetIfReady(java.util.concurrent.CompletableFuture<V> future)Returns the current value or null if either not done or failed.(package private) static <V> VgetWhenSuccessful(java.util.concurrent.CompletableFuture<V> future)Returns the value when completed successfully or null if failed.(package private) static booleanisReady(java.util.concurrent.CompletableFuture<?> future)Returns if the future has successfully completed.
-
-
-
Method Detail
-
isReady
static boolean isReady(@Nullable java.util.concurrent.CompletableFuture<?> future)Returns if the future has successfully completed.
-
getIfReady
@Nullable static <V> V getIfReady(@Nullable java.util.concurrent.CompletableFuture<V> future)Returns the current value or null if either not done or failed.
-
getWhenSuccessful
@Nullable static <V> V getWhenSuccessful(@Nullable java.util.concurrent.CompletableFuture<V> future)Returns the value when completed successfully or null if failed.
-
-