Class ChainedCompletableFuture<I,O>
java.lang.Object
com.linkedin.venice.utils.concurrent.ChainedCompletableFuture<I,O>
- Type Parameters:
I
-O
-
A utility class to chain two completable futures together. This is useful when the future is initially an incomplete
future, and we want to allow the caller to complete the future later. The caller can use the original future to
complete, and use the result future to get the result.
Ideally, the result is a part of the chain of the original future and executes on completion of the original future
(or any of its dependent tasks).
-
Constructor Summary
ConstructorDescriptionChainedCompletableFuture
(CompletableFuture<I> originalFuture, CompletableFuture<O> resultFuture) -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
ChainedCompletableFuture
public ChainedCompletableFuture(CompletableFuture<I> originalFuture, CompletableFuture<O> resultFuture)
-
-
Method Details
-
getOriginalFuture
-
getResultFuture
-