use of com.hazelcast.client.util.ClientPartitionCancellableDelegatingFuture in project hazelcast by hazelcast.
the class ClientExecutorServiceProxy method checkSync.
private <T> Future<T> checkSync(ClientInvocationFuture f, String uuid, int partitionId, 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 ClientPartitionCancellableDelegatingFuture<T>(f, getContext(), uuid, partitionId, defaultValue, SUBMIT_TO_PARTITION_DECODER);
}
}
Aggregations