use of com.hazelcast.client.util.ClientAddressCancellableDelegatingFuture in project hazelcast by hazelcast.
the class ClientExecutorServiceProxy method checkSync.
private <T> Future<T> checkSync(ClientInvocationFuture f, String uuid, Address address, boolean preventSync, T defaultValue) {
boolean sync = isSyncComputation(preventSync);
if (sync) {
Object response = retrieveResultFromMessage(f);
Executor userExecutor = getContext().getExecutionService().getUserExecutor();
return new CompletedFuture<T>(getContext().getSerializationService(), response, userExecutor);
} else {
return new ClientAddressCancellableDelegatingFuture<T>(f, getContext(), uuid, address, defaultValue, SUBMIT_TO_ADDRESS_DECODER);
}
}
Aggregations