public Data executeOnKeyInternal(Data key, EntryProcessor entryProcessor) { int partitionId = partitionService.getPartitionId(key); MapOperation operation = operationProvider.createEntryOperation(name, key, entryProcessor); operation.setThreadId(ThreadUtil.getThreadId()); try { Future future = operationService .createInvocationBuilder(SERVICE_NAME, operation, partitionId) .setResultDeserialized(false) .invoke(); return (Data) future.get(); } catch (Throwable t) { throw rethrow(t); } }
public ICompletableFuture executeOnKeyInternal( Data key, EntryProcessor entryProcessor, ExecutionCallback<Object> callback) { int partitionId = partitionService.getPartitionId(key); MapOperation operation = operationProvider.createEntryOperation(name, key, entryProcessor); operation.setThreadId(ThreadUtil.getThreadId()); try { if (callback == null) { return operationService.invokeOnPartition(SERVICE_NAME, operation, partitionId); } else { return operationService .createInvocationBuilder(SERVICE_NAME, operation, partitionId) .setExecutionCallback(new MapExecutionCallbackAdapter(callback)) .invoke(); } } catch (Throwable t) { throw rethrow(t); } }