Class Async
java.lang.Object
com.github.benmanes.caffeine.cache.Async
Static utility methods and classes pertaining to asynchronous operations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classAn expiry for asynchronous computations.(package private) static final classA removal listener that asynchronously forwards the value stored in aCompletableFutureif successful to the user-supplied removal listener.(package private) static final classA weigher for asynchronous computations. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <V> @Nullable VgetIfReady(@Nullable CompletableFuture<V> future) Returns the current value or null if either not done or failed.(package private) static <V> @Nullable VgetWhenSuccessful(@Nullable CompletableFuture<V> future) Returns the value when completed successfully or null if failed.(package private) static booleanisReady(@Nullable CompletableFuture<?> future) Returns if the future has successfully completed.
-
Field Details
-
ASYNC_EXPIRY
static final long ASYNC_EXPIRY- See Also:
-
-
Constructor Details
-
Async
private Async()
-
-
Method Details
-
isReady
Returns if the future has successfully completed. -
getIfReady
Returns the current value or null if either not done or failed. -
getWhenSuccessful
Returns the value when completed successfully or null if failed.
-