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

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

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

Promise.syncUninterruptibly介绍

暂无

代码示例

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

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

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

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

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

@Override
public Promise<T> syncUninterruptibly() {
  return delegate.syncUninterruptibly();
}

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

public void testConnectNotExists(Bootstrap cb) throws Throwable {
    final Promise<Throwable> promise = ImmediateEventExecutor.INSTANCE.newPromise();
    cb.handler(new ChannelInboundHandlerAdapter() {
      @Override
      public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
        promise.trySuccess(cause);
      }
    });
    ChannelFuture future = cb.connect(NetUtil.LOCALHOST, SocketTestPermutation.BAD_PORT);
    try {
      Channel datagramChannel = future.syncUninterruptibly().channel();
      Assert.assertTrue(datagramChannel.isActive());
      datagramChannel.writeAndFlush(
          Unpooled.copiedBuffer("test", CharsetUtil.US_ASCII)).syncUninterruptibly();
      if (!(datagramChannel instanceof OioDatagramChannel)) {
        Assert.assertTrue(promise.syncUninterruptibly().getNow() instanceof PortUnreachableException);
      }
    } finally {
      future.channel().close();
    }
  }
}

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

plugin = pluginInitPromise.syncUninterruptibly().getNow();

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server-shaded

plugin = pluginInitPromise.syncUninterruptibly().getNow();

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server

plugin = pluginInitPromise.syncUninterruptibly().getNow();

相关文章