public class ClientInvocationFuture extends Object implements ICompletableFuture<ClientMessage>
Modifier and Type | Field and Description |
---|---|
protected ClientMessage |
clientMessage |
protected static ILogger |
LOGGER |
protected Object |
response |
Constructor and Description |
---|
ClientInvocationFuture(ClientInvocation invocation,
HazelcastClientInstanceImpl client,
ClientMessage clientMessage) |
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.
|
boolean |
cancel(boolean mayInterruptIfRunning) |
ClientMessage |
get() |
ClientMessage |
get(long timeout,
TimeUnit unit) |
ClientInvocation |
getInvocation() |
boolean |
isCancelled() |
boolean |
isDone() |
protected static final ILogger LOGGER
protected final ClientMessage clientMessage
protected volatile Object response
public ClientInvocationFuture(ClientInvocation invocation, HazelcastClientInstanceImpl client, ClientMessage clientMessage)
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface Future<ClientMessage>
public boolean isCancelled()
isCancelled
in interface Future<ClientMessage>
public boolean isDone()
isDone
in interface Future<ClientMessage>
public ClientMessage get() throws InterruptedException, ExecutionException
get
in interface Future<ClientMessage>
InterruptedException
ExecutionException
public ClientMessage get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<ClientMessage>
InterruptedException
ExecutionException
TimeoutException
public void andThen(ExecutionCallback<ClientMessage> callback)
ICompletableFuture
andThen
in interface ICompletableFuture<ClientMessage>
callback
- the callback to executepublic void andThen(ExecutionCallback<ClientMessage> callback, Executor executor)
ICompletableFuture
andThen
in interface ICompletableFuture<ClientMessage>
callback
- the callback to executeexecutor
- the executor in which the callback will be runpublic ClientInvocation getInvocation()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.