本文整理了Java中io.netty.util.concurrent.Promise.getNow()
方法的一些代码示例,展示了Promise.getNow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Promise.getNow()
方法的具体详情如下:
包路径:io.netty.util.concurrent.Promise
类名称:Promise
方法名:getNow
暂无
代码示例来源:origin: redisson/redisson
@Override
public T getNow() {
return promise.getNow();
}
代码示例来源:origin: redisson/redisson
@Override
public T getNow() {
return promise.getNow();
}
代码示例来源:origin: line/armeria
@Override
public T getNow() {
return delegate.getNow();
}
代码示例来源:origin: com.cloudera.livy/livy-rsc
@Override
protected T result() {
return promise.getNow();
}
代码示例来源: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: jurmous/etcd4j
/**
* Handle the promise
*
* @param promise to handle
*/
protected void handlePromise(Promise<T> promise) {
if (!promise.isSuccess()) {
this.setException(promise.cause());
} else {
this.response = promise.getNow();
if (handlers != null) {
for (IsSimplePromiseResponseHandler<T> h : handlers) {
h.onResponse(this);
}
}
}
}
代码示例来源:origin: org.nanoframework/nano-ext-etcd
/**
* Handle the promise
*
* @param promise to handle
*/
protected void handlePromise(Promise<T> promise) {
if (!promise.isSuccess()) {
this.setException(promise.cause());
} else {
this.response = promise.getNow();
if (handlers != null) {
for (IsSimplePromiseResponseHandler<T> h : handlers) {
h.onResponse(this);
}
}
}
}
代码示例来源: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();
代码示例来源:origin: addthis/hydra
queryEntry.lastSourceInfo = promise.getNow();
if (queryEntry.queryState == QueryState.AGGREGATING) {
queryEntry.queryState = QueryState.OPS;
内容来源于网络,如有侵权,请联系作者删除!