CompletionStage
CompletionStage is a Java interface in the java.util.concurrent package that represents a stage of an asynchronous computation. A CompletionStage models the future result of a computation, which may complete normally with a value or exceptionally with an error. It does not itself hold a result; instead it provides a pipeline of dependent stages that will execute when the preceding stage completes.
Most commonly, CompletionStage is implemented by CompletableFuture, which provides the actual asynchronous execution and also implements
Execution semantics depend on the underlying executor; many chaining methods execute their actions asynchronously if the
Converting to a concrete future is done via toCompletableFuture, enabling standard Future-based waiting or composition. CompletionStage
See also: CompletableFuture, Future, asynchronous programming in Java.