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

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

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

AsyncFuture.await介绍

[英]Wait if necessary for this operation to complete, returning the outcome. The outcome will be one of Status#COMPLETE, Status#CANCELLED, or Status#FAILED.
[中]如有必要,请等待此操作完成,并返回结果。结果将是状态为“完成”、“取消”或“失败”。

代码示例

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

@Override
public Status await() throws InterruptedException {
  return delegate.await();
}

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

@Override
public Status await() throws InterruptedException {
  return delegate.await();
}

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

@Override
public Status await(long timeout, TimeUnit unit) throws InterruptedException {
  return delegate.await(timeout, unit);
}

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

@Override
public Status await(long timeout, TimeUnit unit) throws InterruptedException {
  return delegate.await(timeout, unit);
}

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

@Override
public void close() throws IOException {
  synchronized (this) {
    try {
      if(isConnected()) {
        try {
          channelHandler.executeRequest(new UnregisterModelControllerRequest(), null).getResult().await();
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
        }
      }
    } finally {
      try {
        connectionManager.shutdown();
      } finally {
        super.close();
      }
    }
  }
}

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

/**
 * Send the started notification
 */
synchronized void started() {
  try {
    if(isConnected()) {
      channelHandler.executeRequest(new ServerStartedRequest(), null).getResult().await();
    }
  } catch (Exception e) {
    ServerLogger.AS_ROOT_LOGGER.debugf(e, "failed to send started notification");
  }
}

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

/**
 * Send the started notification
 */
synchronized void started() {
  try {
    if(isConnected()) {
      channelHandler.executeRequest(new ServerStartedRequest(), null).getResult().await();
    }
  } catch (Exception e) {
    ServerLogger.AS_ROOT_LOGGER.debugf(e, "failed to send started notification");
  }
}

代码示例来源:origin: org.wildfly/wildfly-server

/**
 * Send the started notification
 */
synchronized void started() {
  try {
    if(isConnected()) {
      channelHandler.executeRequest(new ServerStartedRequest(), null).getResult().await();
    }
  } catch (Exception e) {
    ServerLogger.AS_ROOT_LOGGER.debugf(e, "failed to send started notification");
  }
}

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

@Override
public void close() throws IOException {
  try {
    if(prepareClose() && isConnected()) {
      try {
        channelHandler.executeRequest(new UnregisterModelControllerRequest(), null).getResult().await();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
      }
    }
  } finally {
    try {
      super.close();
    } finally {
      connectionManager.shutdown();
    }
  }
}

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

/**
 * Send the started notification
 */
synchronized void started() {
  try {
    if(isConnected()) {
      channelHandler.executeRequest(new ServerStartedRequest(), null).getResult().await();
    }
  } catch (Exception e) {
    ServerLogger.AS_ROOT_LOGGER.debugf(e, "failed to send started notification");
  }
}

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

@Override
public void close() throws IOException {
  try {
    if(prepareClose() && isConnected()) {
      try {
        channelHandler.executeRequest(new UnregisterModelControllerRequest(), null).getResult().await();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
      }
    }
  } finally {
    try {
      super.close();
    } finally {
      connectionManager.shutdown();
    }
  }
}

相关文章