use of com.hazelcast.client.spi.impl.ClientInvocationFuture in project hazelcast by hazelcast.
the class ClientExecutorServiceProxy method submitToTargetInternal.
private <T> void submitToTargetInternal(Callable<T> task, Address address, ExecutionCallback<T> callback) {
checkNotNull(task, "task should not be null");
String uuid = getUUID();
ClientMessage request = ExecutorServiceSubmitToAddressCodec.encodeRequest(name, uuid, toData(task), address);
ClientInvocationFuture f = invokeOnTarget(request, address);
SerializationService serializationService = getContext().getSerializationService();
ClientDelegatingFuture<T> delegatingFuture = new ClientDelegatingFuture<T>(f, serializationService, SUBMIT_TO_ADDRESS_DECODER);
delegatingFuture.andThen(callback);
}
Aggregations