public class ClientInvocationFuture extends AbstractInvocationFuture<ClientMessage>
AbstractInvocationFuture.AbstractBiNode<T,U,R>, AbstractInvocationFuture.AbstractEitherNode<T,R>, AbstractInvocationFuture.ApplyNode<V,R>, AbstractInvocationFuture.ComposeNode<T,U>, AbstractInvocationFuture.ExceptionallyNode<R>, AbstractInvocationFuture.ExceptionalResult, AbstractInvocationFuture.RunNode
CompletableFuture.AsynchronousCompletionTask
logger, state
Constructor and Description |
---|
ClientInvocationFuture(ClientInvocation invocation,
ClientMessage request,
ILogger logger,
CallIdSequence callIdSequence) |
acceptEither, acceptEitherAsync, applyToEither, applyToEitherAsync, cancel, complete, completeExceptionally, completeExceptionallyInternal, defaultExecutor, get, get, getNow, getNumberOfDependents, getState, handle, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, joinInternal, obtrudeException, obtrudeValue, resolveAndThrowWithJoinConvention, returnOrThrowWithJoinConventions, runAfterBoth, runAfterBothAsync, runAfterEither, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenApply, thenApplyAsync, thenCombine, thenCombineAsync, thenCompose, thenComposeAsync, thenRun, thenRunAsync, toCompletableFuture, toString, unblockAcceptEither, unblockApply, unblockApplyToEither, unblockCombine, unblockCompose, unblockHandle, unblockOtherNode, unblockRun, unblockRunAfterEither, unblockWhenComplete, whenComplete, whenCompleteAsync, wrapThrowable
completedExceptionally, completedExceptionally, completingCallback, newCompletedFuture, newCompletedFuture, newCompletedFuture, newCompletedFuture, newDelegatingFuture, withExecutor
allOf, anyOf, completedFuture, runAsync, runAsync, supplyAsync, supplyAsync
public ClientInvocationFuture(ClientInvocation invocation, ClientMessage request, ILogger logger, CallIdSequence callIdSequence)
protected String invocationToString()
invocationToString
in class AbstractInvocationFuture<ClientMessage>
protected TimeoutException newTimeoutException(long timeout, TimeUnit unit)
newTimeoutException
in class AbstractInvocationFuture<ClientMessage>
protected void onInterruptDetected()
onInterruptDetected
in class AbstractInvocationFuture<ClientMessage>
protected Object resolve(Object value)
resolve
in class AbstractInvocationFuture<ClientMessage>
value
- the resolved state of this futureAbstractInvocationFuture.ExceptionalResult
wrapping a Throwable
in case value is resolved
to an exception, or the normal completion value. Subclasses may choose to treat
specific normal completion values in a special way (eg deserialize when the completion
value is an instance of Data
.protected Exception wrapToInstanceNotActiveException(RejectedExecutionException e)
wrapToInstanceNotActiveException
in class AbstractInvocationFuture<ClientMessage>
protected void onComplete()
onComplete
in class AbstractInvocationFuture<ClientMessage>
public ClientMessage resolveAndThrowIfException(Object response) throws ExecutionException, InterruptedException
resolveAndThrowIfException
in class AbstractInvocationFuture<ClientMessage>
ExecutionException
InterruptedException
public ClientInvocation getInvocation()
public InternalCompletableFuture<ClientMessage> exceptionally(@Nonnull Function<Throwable,? extends ClientMessage> fn)
exceptionally
in interface CompletionStage<ClientMessage>
exceptionally
in class AbstractInvocationFuture<ClientMessage>
public InternalCompletableFuture<Void> thenAcceptAsync(@Nonnull Consumer<? super ClientMessage> action, @Nonnull Executor executor)
thenAcceptAsync
in interface CompletionStage<ClientMessage>
thenAcceptAsync
in class AbstractInvocationFuture<ClientMessage>
public <U> InternalCompletableFuture<U> thenApplyAsync(@Nonnull Function<? super ClientMessage,? extends U> fn, Executor executor)
thenApplyAsync
in interface CompletionStage<ClientMessage>
thenApplyAsync
in class AbstractInvocationFuture<ClientMessage>
public InternalCompletableFuture<Void> thenRunAsync(@Nonnull Runnable action, @Nonnull Executor executor)
thenRunAsync
in interface CompletionStage<ClientMessage>
thenRunAsync
in class AbstractInvocationFuture<ClientMessage>
public <U> InternalCompletableFuture<U> thenComposeAsync(@Nonnull Function<? super ClientMessage,? extends CompletionStage<U>> fn, @Nonnull Executor executor)
thenComposeAsync
in interface CompletionStage<ClientMessage>
thenComposeAsync
in class AbstractInvocationFuture<ClientMessage>
public <U,R> InternalCompletableFuture<R> thenCombineAsync(@Nonnull CompletionStage<? extends U> other, @Nonnull BiFunction<? super ClientMessage,? super U,? extends R> fn, @Nonnull Executor executor)
thenCombineAsync
in interface CompletionStage<ClientMessage>
thenCombineAsync
in class AbstractInvocationFuture<ClientMessage>
public <U> InternalCompletableFuture<Void> thenAcceptBothAsync(@Nonnull CompletionStage<? extends U> other, @Nonnull BiConsumer<? super ClientMessage,? super U> action, @Nonnull Executor executor)
thenAcceptBothAsync
in interface CompletionStage<ClientMessage>
thenAcceptBothAsync
in class AbstractInvocationFuture<ClientMessage>
public InternalCompletableFuture<Void> runAfterBothAsync(@Nonnull CompletionStage<?> other, @Nonnull Runnable action, @Nonnull Executor executor)
runAfterBothAsync
in interface CompletionStage<ClientMessage>
runAfterBothAsync
in class AbstractInvocationFuture<ClientMessage>
public <U> InternalCompletableFuture<U> applyToEitherAsync(@Nonnull CompletionStage<? extends ClientMessage> other, @Nonnull Function<? super ClientMessage,U> fn, @Nonnull Executor executor)
applyToEitherAsync
in interface CompletionStage<ClientMessage>
applyToEitherAsync
in class AbstractInvocationFuture<ClientMessage>
public InternalCompletableFuture<Void> acceptEitherAsync(@Nonnull CompletionStage<? extends ClientMessage> other, @Nonnull Consumer<? super ClientMessage> action, @Nonnull Executor executor)
acceptEitherAsync
in interface CompletionStage<ClientMessage>
acceptEitherAsync
in class AbstractInvocationFuture<ClientMessage>
public InternalCompletableFuture<Void> runAfterEitherAsync(@Nonnull CompletionStage<?> other, @Nonnull Runnable action, @Nonnull Executor executor)
runAfterEitherAsync
in interface CompletionStage<ClientMessage>
runAfterEitherAsync
in class AbstractInvocationFuture<ClientMessage>
public InternalCompletableFuture<ClientMessage> whenCompleteAsync(@Nonnull BiConsumer<? super ClientMessage,? super Throwable> action, @Nonnull Executor executor)
whenCompleteAsync
in interface CompletionStage<ClientMessage>
whenCompleteAsync
in class AbstractInvocationFuture<ClientMessage>
public <U> InternalCompletableFuture<U> handleAsync(@Nonnull BiFunction<? super ClientMessage,Throwable,? extends U> fn, @Nonnull Executor executor)
handleAsync
in interface CompletionStage<ClientMessage>
handleAsync
in class AbstractInvocationFuture<ClientMessage>
Copyright © 2019 Hazelcast, Inc.. All rights reserved.