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 the future is completed.
|
void |
andThen(ExecutionCallback<ClientMessage> callback,
Executor executor)
Registers a callback that will run with the provided executor after the 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
andThen
in interface ICompletableFuture<ClientMessage>
andThen
in class AbstractInvocationFuture<ClientMessage>
callback
- the callback to executepublic void andThen(ExecutionCallback<ClientMessage> callback, Executor executor)
ICompletableFuture
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 © 2017 Hazelcast, Inc.. All Rights Reserved.