Class FutureCompletion

java.lang.Object
java.util.concurrent.CompletableFuture<Boolean>
com.yahoo.jdisc.handler.FutureCompletion
All Implemented Interfaces:
CompletionHandler, CompletionStage<Boolean>, Future<Boolean>

public final class FutureCompletion extends CompletableFuture<Boolean> implements CompletionHandler

This class provides an implementation of CompletionHandler that allows you to wait for either completed() or failed(Throwable) to be called. If failed() was called, the corresponding Throwable will be rethrown when calling either of the get() methods. Unless an exception is thrown, the get() methods will always return Boolean.TRUE.

Notice that calling cancel(boolean) throws an UnsupportedOperationException.

Author:
Simon Thoresen Hult