public class ClientInvocationFuture extends AbstractInvocationFuture<ClientMessage>
defaultExecutor, logger
Constructor and Description |
---|
ClientInvocationFuture(ClientInvocation invocation,
Executor internalExecutor,
ClientMessage request,
ILogger logger,
CallIdSequence callIdSequence) |
Modifier and Type | Method and Description |
---|---|
void |
andThen(ExecutionCallback<ClientMessage> callback)
Registers a callback that will run after this future is completed.
|
void |
andThen(ExecutionCallback<ClientMessage> callback,
Executor executor)
Registers a callback that will run with the provided executor after this
future is completed.
|
ClientInvocation |
getInvocation() |
protected String |
invocationToString() |
protected TimeoutException |
newTimeoutException(long timeout,
TimeUnit unit) |
protected void |
onComplete() |
protected void |
onInterruptDetected() |
protected Object |
resolve(Object value) |
ClientMessage |
resolveAndThrowIfException(Object response) |
protected Throwable |
unwrap(Throwable throwable) |
cancel, complete, get, get, getState, isCancelled, isDone, join, toString
public ClientInvocationFuture(ClientInvocation invocation, Executor internalExecutor, ClientMessage request, ILogger logger, CallIdSequence callIdSequence)
protected String invocationToString()
invocationToString
in class AbstractInvocationFuture<ClientMessage>
protected void onInterruptDetected()
onInterruptDetected
in class AbstractInvocationFuture<ClientMessage>
protected TimeoutException newTimeoutException(long timeout, TimeUnit unit)
newTimeoutException
in class AbstractInvocationFuture<ClientMessage>
protected Throwable unwrap(Throwable throwable)
unwrap
in class AbstractInvocationFuture<ClientMessage>
protected Object resolve(Object value)
resolve
in class AbstractInvocationFuture<ClientMessage>
public void andThen(ExecutionCallback<ClientMessage> callback)
ICompletableFuture
Please note that there is no ordering guarantee for running multiple callbacks. It is also not guaranteed that the callback will run within the same thread that completes the future.
andThen
in interface ICompletableFuture<ClientMessage>
andThen
in class AbstractInvocationFuture<ClientMessage>
callback
- the callback to executepublic void andThen(ExecutionCallback<ClientMessage> callback, Executor executor)
ICompletableFuture
executor
.
Please note that there is no ordering guarantee for executing multiple
callbacks.andThen
in interface ICompletableFuture<ClientMessage>
andThen
in class AbstractInvocationFuture<ClientMessage>
callback
- the callback to executeexecutor
- the executor in which the callback will be runprotected 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()
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.