io.netty.util.concurrent.Promise.await()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(277)

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

Promise.await介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

@Override
public RPromise<T> await() throws InterruptedException {
  promise.await();
  return this;
}

代码示例来源:origin: redisson/redisson

@Override
public RPromise<T> await() throws InterruptedException {
  promise.await();
  return this;
}

代码示例来源:origin: redisson/redisson

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

代码示例来源:origin: redisson/redisson

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

代码示例来源:origin: redisson/redisson

@Override
public boolean await(long timeoutMillis) throws InterruptedException {
  return promise.await(timeoutMillis);
}

代码示例来源:origin: redisson/redisson

@Override
public boolean await(long timeoutMillis) throws InterruptedException {
  return promise.await(timeoutMillis);
}

代码示例来源:origin: line/armeria

@Override
public Promise<T> await() throws InterruptedException {
  return delegate.await();
}

代码示例来源:origin: line/armeria

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

代码示例来源:origin: line/armeria

@Override
public boolean await(long timeoutMillis) throws InterruptedException {
  return delegate.await(timeoutMillis);
}

代码示例来源:origin: line/armeria

assertTrue(handler.settingsPromise.await(5, TimeUnit.SECONDS));
handler.settingsPromise.get();
assertTrue(handler.responsePromise.await(5, TimeUnit.SECONDS));
final ByteBuf response = handler.responsePromise.get();

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void close() {
  try {
    setClosedFlag().await();
    for (MultiplexedChannelRecord c : connections) {
      Future<Channel> f = c.getConnectionFuture();
      f.await();
      if (f.isSuccess()) {
        connectionPool.release(f.getNow()).await();
      }
    }
    connectionPool.close();
  } catch (InterruptedException ie) {
    Thread.currentThread().interrupt();
    throw new RuntimeException(ie);
  }
}

代码示例来源:origin: software.amazon.awssdk/netty-nio-client

@Override
public void close() {
  try {
    setClosedFlag().await();
    for (MultiplexedChannelRecord c : connections) {
      Future<Channel> f = c.getConnectionFuture();
      f.await();
      if (f.isSuccess()) {
        connectionPool.release(f.getNow()).await();
      }
    }
    connectionPool.close();
  } catch (InterruptedException ie) {
    Thread.currentThread().interrupt();
    throw new RuntimeException(ie);
  }
}

代码示例来源:origin: io.netty/netty-testsuite

promise.await();
Long stop = TrafficCounter.milliSecondFromNano();
assertTrue("Error during execution of TrafficShapping: " + promise.cause(), promise.isSuccess());

相关文章