private boolean invokeCancelRequest(boolean mayInterruptIfRunning) throws InterruptedException, ExecutionException { waitForRequestToBeSend(); HazelcastClientInstanceImpl client = (HazelcastClientInstanceImpl) context.getHazelcastInstance(); if (partitionId > -1) { ClientMessage request = ExecutorServiceCancelOnPartitionCodec.encodeRequest(uuid, partitionId, mayInterruptIfRunning); ClientInvocation clientInvocation = new ClientInvocation(client, request, objectName, partitionId); ClientInvocationFuture f = clientInvocation.invoke(); return ExecutorServiceCancelOnPartitionCodec.decodeResponse(f.get()).response; } else { ClientMessage request = ExecutorServiceCancelOnAddressCodec.encodeRequest(uuid, target, mayInterruptIfRunning); ClientInvocation clientInvocation = new ClientInvocation(client, request, objectName, target); ClientInvocationFuture f = clientInvocation.invoke(); return ExecutorServiceCancelOnAddressCodec.decodeResponse(f.get()).response; } }
private boolean invokeCancelRequest(boolean mayInterruptIfRunning) throws InterruptedException, ExecutionException { waitForRequestToBeSend(); HazelcastClientInstanceImpl client = (HazelcastClientInstanceImpl) context.getHazelcastInstance(); if (partitionId > -1) { ClientMessage request = ExecutorServiceCancelOnPartitionCodec.encodeRequest(uuid, partitionId, mayInterruptIfRunning); ClientInvocation clientInvocation = new ClientInvocation(client, request, objectName, partitionId); ClientInvocationFuture f = clientInvocation.invoke(); return ExecutorServiceCancelOnPartitionCodec.decodeResponse(f.get()).response; } else { ClientMessage request = ExecutorServiceCancelOnAddressCodec.encodeRequest(uuid, target, mayInterruptIfRunning); ClientInvocation clientInvocation = new ClientInvocation(client, request, objectName, target); ClientInvocationFuture f = clientInvocation.invoke(); return ExecutorServiceCancelOnAddressCodec.decodeResponse(f.get()).response; } }