NodeEngine nodeEngine = getNodeEngine();
String uuid = buildRandomUuidString();
int partitionId = getTaskPartitionId(callable);
CallableTaskOperation op = new CallableTaskOperation(name, uuid, callable);
ICompletableFuture future = invoke(partitionId, op);
boolean sync = checkSync();
if (sync) {
try {
future.get();
} catch (Exception exception) {
logger.warning(exception);
}
return new CompletedFuture<T>(nodeEngine.getSerializationService(), result, getAsyncExecutor());
}