Class ThriftFuture<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
com.linecorp.armeria.common.util.EventLoopCheckingFuture<T>
com.linecorp.armeria.common.thrift.ThriftFuture<T>
- All Implemented Interfaces:
CompletionStage<T>,Future<T>,AsyncMethodCallback<T>
public final class ThriftFuture<T>
extends com.linecorp.armeria.common.util.EventLoopCheckingFuture<T>
implements AsyncMethodCallback<T>
A
CompletableFuture that can be passed in as an AsyncMethodCallback
when making an asynchronous client-side Thrift RPC.-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ThriftFuture<T>completedFuture(T value) Returns a newThriftFutureinstance that has its value set immediately.static <T> ThriftFuture<T>Returns a newThriftFutureinstance that has an exception set immediately.voidonComplete(T value) voidMethods inherited from class com.linecorp.armeria.common.util.EventLoopCheckingFuture
get, get, joinMethods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, resultNow, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, state, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
-
Constructor Details
-
ThriftFuture
public ThriftFuture()
-
-
Method Details
-
completedFuture
Returns a newThriftFutureinstance that has its value set immediately. -
exceptionallyCompletedFuture
Returns a newThriftFutureinstance that has an exception set immediately. -
onComplete
- Specified by:
onCompletein interfaceAsyncMethodCallback<T>
-
onError
- Specified by:
onErrorin interfaceAsyncMethodCallback<T>
-