org.jboss.threads.AsyncFuture.asyncCancel()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中org.jboss.threads.AsyncFuture.asyncCancel()方法的一些代码示例,展示了AsyncFuture.asyncCancel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncFuture.asyncCancel()方法的具体详情如下:
包路径:org.jboss.threads.AsyncFuture
类名称:AsyncFuture
方法名:asyncCancel

AsyncFuture.asyncCancel介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly-core

private void asyncCancel() {
  if (finalResult instanceof AsyncFuture) {
    ((AsyncFuture) finalResult).asyncCancel(true);
  }
}

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

private void asyncCancel() {
  if (finalResult instanceof AsyncFuture) {
    ((AsyncFuture) finalResult).asyncCancel(true);
  }
}

代码示例来源:origin: org.jboss.as/jboss-as-host-controller

public void asyncCancel() {
    futureResult.asyncCancel(false);
  }
}

代码示例来源:origin: wildfly/wildfly-core

@Override
public void asyncCancel(boolean interruptionDesired) {
  delegate.asyncCancel(interruptionDesired);
}

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

public void asyncCancel() {
  futureResult.asyncCancel(true);
}

代码示例来源:origin: wildfly/wildfly-core

public void asyncCancel() {
  futureResult.asyncCancel(true);
}

代码示例来源:origin: wildfly/wildfly-core

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);
  }
}

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

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);
  }
}

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

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;
}

代码示例来源:origin: wildfly/wildfly-core

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;
}

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

private synchronized void registerFuture(TransactionalProtocolClient remoteClient, AsyncFuture<OperationResponse> future) {
  if (this.remoteClient != remoteClient) {
    future.asyncCancel(true);
  } else {

代码示例来源:origin: wildfly/wildfly-core

private synchronized void registerFuture(TransactionalProtocolClient remoteClient, AsyncFuture<OperationResponse> future) {
  if (this.remoteClient != remoteClient) {
    future.asyncCancel(true);
  } else {

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

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);

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

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);

代码示例来源:origin: wildfly/wildfly-core

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);

代码示例来源:origin: wildfly/wildfly-core

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);

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

} 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;

代码示例来源:origin: wildfly/wildfly-core

} 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;

代码示例来源:origin: wildfly/wildfly-core

future.asyncCancel(true);
  HOST_CONTROLLER_LOGGER.caughtExceptionAwaitingFinalResponse(e.getCause(), hostName);
} catch (TimeoutException e) {
  future.asyncCancel(true);
  if (interruptThread) {
    HOST_CONTROLLER_LOGGER.interruptedAwaitingFinalResponse(hostName);

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

future.asyncCancel(true);
  HOST_CONTROLLER_LOGGER.caughtExceptionAwaitingFinalResponse(e.getCause(), hostName);
} catch (TimeoutException e) {
  future.asyncCancel(true);
  if (interruptThread) {
    HOST_CONTROLLER_LOGGER.interruptedAwaitingFinalResponse(hostName);

相关文章