V - Value type that user expectingpublic class ClientDelegatingFuture<V> extends Object implements InternalCompletableFuture<V>
| Constructor and Description |
|---|
ClientDelegatingFuture(ClientInvocationFuture clientInvocationFuture,
SerializationService serializationService,
ClientMessageDecoder clientMessageDecoder) |
ClientDelegatingFuture(ClientInvocationFuture clientInvocationFuture,
SerializationService serializationService,
ClientMessageDecoder clientMessageDecoder,
V defaultValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
andThen(ExecutionCallback<V> callback)
Registers a callback that will run after the future is completed.
|
void |
andThen(ExecutionCallback<V> callback,
Executor executor)
Registers a callback that will run with the provided executor after the future is completed.
|
<T> void |
andThenInternal(ExecutionCallback<T> callback,
boolean shouldDeserializeData)
Uses internal executor to execute callbacks instead of
userExecutor. |
boolean |
cancel(boolean mayInterruptIfRunning) |
boolean |
complete(Object value)
Completes this future.
|
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
protected ClientInvocationFuture |
getFuture() |
Object |
getRaw() |
boolean |
isCancelled() |
boolean |
isDone() |
V |
join()
Waits for this future to complete.
|
public ClientDelegatingFuture(ClientInvocationFuture clientInvocationFuture, SerializationService serializationService, ClientMessageDecoder clientMessageDecoder, V defaultValue)
public ClientDelegatingFuture(ClientInvocationFuture clientInvocationFuture, SerializationService serializationService, ClientMessageDecoder clientMessageDecoder)
public <T> void andThenInternal(ExecutionCallback<T> callback, boolean shouldDeserializeData)
userExecutor.
This method is intended to use by hazelcast internals.T - type of the execution result which is passed to ExecutionCallback.onResponse(V)callback - callback to executeshouldDeserializeData - when true execution result is converted to object format
before passing to ExecutionCallback.onResponse(V),
otherwise execution result will be in Data formatpublic void andThen(ExecutionCallback<V> callback)
ICompletableFutureandThen in interface ICompletableFuture<V>callback - the callback to executepublic void andThen(ExecutionCallback<V> callback, Executor executor)
ICompletableFutureandThen in interface ICompletableFuture<V>callback - the callback to executeexecutor - the executor in which the callback will be runpublic boolean complete(Object value)
InternalCompletableFuturecomplete in interface InternalCompletableFuture<V>value - the value to complete this future with.true if this invocation caused this InternalCompletableFuture to complete, else falsepublic boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>public V get() throws InterruptedException, ExecutionException
get in interface Future<V>InterruptedExceptionExecutionExceptionpublic V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<V>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic Object getRaw() throws InterruptedException, ExecutionException, TimeoutException
public V join()
InternalCompletableFuturejoin in interface InternalCompletableFuture<V>protected ClientInvocationFuture getFuture()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.