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

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

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

Promise.sync介绍

暂无

代码示例

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

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

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

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

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

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

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

public void testBufRelease(ServerBootstrap sb, Bootstrap cb) throws Throwable {
  BufWriterHandler serverHandler = new BufWriterHandler();
  BufWriterHandler clientHandler = new BufWriterHandler();
  sb.childHandler(serverHandler);
  cb.handler(clientHandler);
  Channel sc = sb.bind().sync().channel();
  Channel cc = cb.connect(sc.localAddress()).sync().channel();
  // Ensure the server socket accepted the client connection *and* initialized pipeline successfully.
  serverHandler.channelFuture.sync();
  // and then close all sockets.
  sc.close().sync();
  cc.close().sync();
  serverHandler.check();
  clientHandler.check();
  serverHandler.release();
  clientHandler.release();
}

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

ch.donePromise.sync();
sh.donePromise.sync();
sh.channel.close().sync();
ch.channel.close().sync();

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

serverDonePromise.sync();
sh.channel.close().sync();
ch.channel.close().sync();

相关文章