本文整理了Java中io.netty.util.concurrent.Promise.get()
方法的一些代码示例,展示了Promise.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Promise.get()
方法的具体详情如下:
包路径:io.netty.util.concurrent.Promise
类名称:Promise
方法名:get
暂无
代码示例来源:origin: redisson/redisson
@Override
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
return promise.get(timeout, unit);
}
代码示例来源:origin: redisson/redisson
@Override
public T get() throws InterruptedException, ExecutionException {
return promise.get();
}
代码示例来源:origin: redisson/redisson
@Override
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
return promise.get(timeout, unit);
}
代码示例来源:origin: redisson/redisson
@Override
public T get() throws InterruptedException, ExecutionException {
return promise.get();
}
代码示例来源:origin: apache/hive
@Override
public T get(long timeout, TimeUnit unit)
throws ExecutionException, InterruptedException, TimeoutException {
return promise.get(timeout, unit);
}
代码示例来源:origin: apache/hive
@Override
public T get() throws ExecutionException, InterruptedException {
return promise.get();
}
代码示例来源:origin: line/armeria
@Override
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException,
java.util.concurrent.TimeoutException {
return delegate.get(timeout, unit);
}
}
代码示例来源:origin: line/armeria
@Override
public T get() throws InterruptedException, ExecutionException {
return delegate.get();
}
代码示例来源:origin: apache/hive
clientId, secret, protocol).get();
this.running = true;
代码示例来源:origin: apache/hive
private void fireStateChange(State newState, Listener<T> listener) {
switch (newState) {
case SENT:
break;
case QUEUED:
listener.onJobQueued(this);
break;
case STARTED:
listener.onJobStarted(this);
break;
case CANCELLED:
listener.onJobCancelled(this);
break;
case FAILED:
listener.onJobFailed(this, promise.cause());
break;
case SUCCEEDED:
try {
listener.onJobSucceeded(this, promise.get());
} catch (Exception e) {
// Shouldn't really happen.
throw new IllegalStateException(e);
}
break;
default:
throw new IllegalStateException();
}
}
代码示例来源:origin: line/armeria
handler.settingsPromise.get();
final ByteBuf response = handler.responsePromise.get();
代码示例来源:origin: org.spark-project.hive/spark-client
@Override
public T get(long timeout, TimeUnit unit)
throws ExecutionException, InterruptedException, TimeoutException {
return promise.get(timeout, unit);
}
代码示例来源:origin: com.cloudera.livy/livy-rsc
@Override
public T get(long timeout, TimeUnit unit)
throws ExecutionException, InterruptedException, TimeoutException {
return promise.get(timeout, unit);
}
代码示例来源:origin: com.github.hyukjinkwon/spark-client
@Override
public T get(long timeout, TimeUnit unit)
throws ExecutionException, InterruptedException, TimeoutException {
return promise.get(timeout, unit);
}
代码示例来源:origin: com.cloudera.livy/livy-rsc
@Override
public T get() throws ExecutionException, InterruptedException {
return promise.get();
}
代码示例来源:origin: com.github.hyukjinkwon/spark-client
@Override
public T get() throws ExecutionException, InterruptedException {
return promise.get();
}
代码示例来源:origin: org.spark-project.hive/spark-client
@Override
public T get() throws ExecutionException, InterruptedException {
return promise.get();
}
代码示例来源:origin: io.netty/netty-testsuite
public void testLocalAddressAfterConnect(ServerBootstrap sb, Bootstrap cb) throws Throwable {
Channel serverChannel = null;
Channel clientChannel = null;
try {
final Promise<InetSocketAddress> localAddressPromise = ImmediateEventExecutor.INSTANCE.newPromise();
serverChannel = sb.childHandler(new ChannelInboundHandlerAdapter() {
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
localAddressPromise.setSuccess((InetSocketAddress) ctx.channel().localAddress());
}
}).bind().syncUninterruptibly().channel();
clientChannel = cb.handler(new ChannelInboundHandlerAdapter()).register().syncUninterruptibly().channel();
assertNull(clientChannel.localAddress());
assertNull(clientChannel.remoteAddress());
clientChannel.connect(serverChannel.localAddress()).syncUninterruptibly().channel();
assertLocalAddress((InetSocketAddress) clientChannel.localAddress());
assertNotNull(clientChannel.remoteAddress());
assertLocalAddress(localAddressPromise.get());
} finally {
if (clientChannel != null) {
clientChannel.close().syncUninterruptibly();
}
if (serverChannel != null) {
serverChannel.close().syncUninterruptibly();
}
}
}
代码示例来源:origin: org.spark-project.hive/spark-client
private void fireStateChange(State s, Listener l) {
switch (s) {
case SENT:
break;
case QUEUED:
l.onJobQueued(this);
break;
case STARTED:
l.onJobStarted(this);
break;
case CANCELLED:
l.onJobCancelled(this);
break;
case FAILED:
l.onJobFailed(this, promise.cause());
break;
case SUCCEEDED:
try {
l.onJobSucceeded(this, promise.get());
} catch (Exception e) {
// Shouldn't really happen.
throw new IllegalStateException(e);
}
break;
default:
throw new IllegalStateException();
}
}
代码示例来源:origin: com.github.hyukjinkwon/spark-client
private void fireStateChange(State s, Listener l) {
switch (s) {
case SENT:
break;
case QUEUED:
l.onJobQueued(this);
break;
case STARTED:
l.onJobStarted(this);
break;
case CANCELLED:
l.onJobCancelled(this);
break;
case FAILED:
l.onJobFailed(this, promise.cause());
break;
case SUCCEEDED:
try {
l.onJobSucceeded(this, promise.get());
} catch (Exception e) {
// Shouldn't really happen.
throw new IllegalStateException(e);
}
break;
default:
throw new IllegalStateException();
}
}
内容来源于网络,如有侵权,请联系作者删除!