private void asyncCancel() { if (finalResult instanceof AsyncFuture) { ((AsyncFuture) finalResult).asyncCancel(true); } }
private void asyncCancel() { if (finalResult instanceof AsyncFuture) { ((AsyncFuture) finalResult).asyncCancel(true); } }
public void asyncCancel() { futureResult.asyncCancel(false); } }
@Override public void asyncCancel(boolean interruptionDesired) { delegate.asyncCancel(interruptionDesired); }
public void asyncCancel() { futureResult.asyncCancel(true); }
public void asyncCancel() { futureResult.asyncCancel(true); }
private void cancelPreferAsync(Future<?> future, boolean mayInterruptIfRunning) { if (future instanceof AsyncFuture) { // the normal case ((AsyncFuture) future).asyncCancel(mayInterruptIfRunning); } else { // the ServerRequireRestartTask case, where we're interrupting a thread executing an op locally future.cancel(mayInterruptIfRunning); } }
private void cancelPreferAsync(Future<?> future, boolean mayInterruptIfRunning) { if (future instanceof AsyncFuture) { // the normal case ((AsyncFuture) future).asyncCancel(mayInterruptIfRunning); } else { // the ServerRequireRestartTask case, where we're interrupting a thread executing an op locally future.cancel(mayInterruptIfRunning); } }
synchronized boolean disconnected(final TransactionalProtocolClient old) { if(remoteClient == old) { remoteClient = DISCONNECTED; // Cancel any inflight requests from the old TransactionalProtocolClient Set<AsyncFuture<OperationResponse>> inFlight = activeRequests.remove(old); if (inFlight != null) { for (AsyncFuture<OperationResponse> future : inFlight) { future.asyncCancel(true); } } return true; } return false; }
synchronized boolean disconnected(final TransactionalProtocolClient old) { if(remoteClient == old) { remoteClient = DISCONNECTED; // Cancel any inflight requests from the old TransactionalProtocolClient Set<AsyncFuture<OperationResponse>> inFlight = activeRequests.remove(old); if (inFlight != null) { for (AsyncFuture<OperationResponse> future : inFlight) { future.asyncCancel(true); } } return true; } return false; }
private synchronized void registerFuture(TransactionalProtocolClient remoteClient, AsyncFuture<OperationResponse> future) { if (this.remoteClient != remoteClient) { future.asyncCancel(true); } else {
private synchronized void registerFuture(TransactionalProtocolClient remoteClient, AsyncFuture<OperationResponse> future) { if (this.remoteClient != remoteClient) { future.asyncCancel(true); } else {
HostControllerLogger.ROOT_LOGGER.timedOutAwaitingResumeResponseMsg(timeout, serverName) )); future.asyncCancel(true); continue; HostControllerLogger.ROOT_LOGGER.interruptedAwaitingResumeResponseMsg(serverName) )); future.asyncCancel(true); Thread.currentThread().interrupt(); } catch (TimeoutException e) { HostControllerLogger.ROOT_LOGGER.timedOutAwaitingResumeResponseMsg(timeout, serverName) )); future.asyncCancel(true); } catch (ExecutionException e) { HostControllerLogger.ROOT_LOGGER.resumeListenerFailed(e, serverName); HostControllerLogger.ROOT_LOGGER.resumeListenerFailedMsg(serverName) )); future.asyncCancel(true);
HostControllerLogger.ROOT_LOGGER.timedOutAwaitingSuspendResponseMsg(timeout, serverName) )); future.asyncCancel(true); continue; HostControllerLogger.ROOT_LOGGER.interruptedAwaitingSuspendResponseMsg(serverName) )); future.asyncCancel(true); Thread.currentThread().interrupt(); } catch (TimeoutException e) { HostControllerLogger.ROOT_LOGGER.timedOutAwaitingSuspendResponseMsg(timeout, serverName) )); future.asyncCancel(true); } catch (ExecutionException e) { HostControllerLogger.ROOT_LOGGER.suspendListenerFailed(e, serverName); HostControllerLogger.ROOT_LOGGER.suspendListenerFailedMsg(serverName) )); future.asyncCancel(true);
HostControllerLogger.ROOT_LOGGER.timedOutAwaitingSuspendResponseMsg(timeout, serverName) )); future.asyncCancel(true); continue; HostControllerLogger.ROOT_LOGGER.interruptedAwaitingSuspendResponseMsg(serverName) )); future.asyncCancel(true); Thread.currentThread().interrupt(); } catch (TimeoutException e) { HostControllerLogger.ROOT_LOGGER.timedOutAwaitingSuspendResponseMsg(timeout, serverName) )); future.asyncCancel(true); } catch (ExecutionException e) { HostControllerLogger.ROOT_LOGGER.suspendListenerFailed(e, serverName); HostControllerLogger.ROOT_LOGGER.suspendListenerFailedMsg(serverName) )); future.asyncCancel(true);
HostControllerLogger.ROOT_LOGGER.timedOutAwaitingResumeResponseMsg(timeout, serverName) )); future.asyncCancel(true); continue; HostControllerLogger.ROOT_LOGGER.interruptedAwaitingResumeResponseMsg(serverName) )); future.asyncCancel(true); Thread.currentThread().interrupt(); } catch (TimeoutException e) { HostControllerLogger.ROOT_LOGGER.timedOutAwaitingResumeResponseMsg(timeout, serverName) )); future.asyncCancel(true); } catch (ExecutionException e) { HostControllerLogger.ROOT_LOGGER.resumeListenerFailed(e, serverName); HostControllerLogger.ROOT_LOGGER.resumeListenerFailedMsg(serverName) )); future.asyncCancel(true);
} catch (InterruptedException e) { HostControllerLogger.ROOT_LOGGER.interruptedAwaitingSuspendResponse(e, serverName); future.asyncCancel(true); Thread.currentThread().interrupt(); return false; } catch (ExecutionException e) { HostControllerLogger.ROOT_LOGGER.suspendListenerFailed(e, serverName); future.asyncCancel(true); return false;
} catch (InterruptedException e) { HostControllerLogger.ROOT_LOGGER.interruptedAwaitingSuspendResponse(e, serverName); future.asyncCancel(true); Thread.currentThread().interrupt(); return false; } catch (ExecutionException e) { HostControllerLogger.ROOT_LOGGER.suspendListenerFailed(e, serverName); future.asyncCancel(true); return false;
future.asyncCancel(true); HOST_CONTROLLER_LOGGER.caughtExceptionAwaitingFinalResponse(e.getCause(), hostName); } catch (TimeoutException e) { future.asyncCancel(true); if (interruptThread) { HOST_CONTROLLER_LOGGER.interruptedAwaitingFinalResponse(hostName);
future.asyncCancel(true); HOST_CONTROLLER_LOGGER.caughtExceptionAwaitingFinalResponse(e.getCause(), hostName); } catch (TimeoutException e) { future.asyncCancel(true); if (interruptThread) { HOST_CONTROLLER_LOGGER.interruptedAwaitingFinalResponse(hostName);