本文整理了Java中io.netty.util.concurrent.Promise.isCancelled()
方法的一些代码示例,展示了Promise.isCancelled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Promise.isCancelled()
方法的具体详情如下:
包路径:io.netty.util.concurrent.Promise
类名称:Promise
方法名:isCancelled
暂无
代码示例来源:origin: redisson/redisson
@Override
public boolean isCancelled() {
return promise.isCancelled();
}
代码示例来源:origin: redisson/redisson
@Override
public boolean isCancelled() {
return promise.isCancelled();
}
代码示例来源:origin: apache/hive
@Override
public boolean isCancelled() {
return promise.isCancelled();
}
代码示例来源:origin: line/armeria
@Override
public boolean isCancelled() {
return delegate.isCancelled();
}
代码示例来源:origin: apache/hive
@Override
public void operationComplete(Promise<Rpc> p) {
if (p.isCancelled()) {
cf.cancel(true);
}
}
});
代码示例来源:origin: redisson/redisson
final Promise<List<T>> promise,
final Throwable cause) {
if (nameServerAddrStreamIndex >= nameServerAddrStream.size() || allowedQueries == 0 || promise.isCancelled()) {
tryToFinishResolve(nameServerAddrStream, nameServerAddrStreamIndex, question, queryLifecycleObserver,
promise, cause);
代码示例来源:origin: wildfly/wildfly
final Promise<List<T>> promise,
final Throwable cause) {
if (nameServerAddrStreamIndex >= nameServerAddrStream.size() || allowedQueries == 0 || promise.isCancelled()) {
tryToFinishResolve(nameServerAddrStream, nameServerAddrStreamIndex, question, queryLifecycleObserver,
promise, cause);
代码示例来源:origin: com.cloudera.livy/livy-rsc
@Override
public boolean isCancelled() {
return promise.isCancelled();
}
代码示例来源:origin: com.github.hyukjinkwon/spark-client
@Override
public boolean isCancelled() {
return promise.isCancelled();
}
代码示例来源:origin: org.spark-project.hive/spark-client
@Override
public boolean isCancelled() {
return promise.isCancelled();
}
代码示例来源:origin: com.github.hyukjinkwon/spark-client
@Override
public void operationComplete(Promise<Rpc> p) {
if (p.isCancelled()) {
cf.cancel(true);
}
}
});
代码示例来源:origin: org.spark-project.hive/spark-client
@Override
public void operationComplete(Promise<Rpc> p) {
if (p.isCancelled()) {
cf.cancel(true);
}
}
});
代码示例来源:origin: com.cloudera.livy/livy-rsc
@Override
public void operationComplete(Promise<Rpc> p) {
if (p.isCancelled()) {
cf.cancel(true);
}
}
});
代码示例来源:origin: org.opendaylight.controller/netconf-netty-util
private boolean isPromiseFinished() {
return promise.isDone() || promise.isCancelled();
}
代码示例来源:origin: org.opendaylight.netconf/netconf-netty-util
private boolean isPromiseFinished() {
return promise.isDone() || promise.isCancelled();
}
代码示例来源:origin: com.cloudera.livy/livy-rsc
@Override
public void operationComplete(Promise<T> p) {
if (jobId != null) {
jobs.remove(jobId);
}
if (p.isCancelled() && !rpc.isDone()) {
rpc.cancel(true);
}
}
});
代码示例来源:origin: jurmous/etcd4j
/**
* Wait for promise to be done
*
* @throws IOException on IOException
* @throws TimeoutException on timeout
*/
protected void waitForPromiseSuccess() throws IOException, TimeoutException {
while(!promise.isDone() && !promise.isCancelled()) {
Promise<T> listeningPromise = this.promise;
listeningPromise.awaitUninterruptibly();
if (listeningPromise == this.promise) {
this.handlePromise(promise);
break;
}
}
}
代码示例来源:origin: jurmous/etcd4j
if (etcdRequest.getPromise().getNettyPromise().isCancelled()) {
f.channel().close();
etcdRequest.getPromise().getNettyPromise().setFailure(new CancellationException());
代码示例来源:origin: org.asynchttpclient/netty-resolver-dns
private void query(final DnsServerAddressStream nameServerAddrStream, final DnsQuestion question,
final Promise<T> promise) {
if (allowedQueries == 0 || promise.isCancelled()) {
tryToFinishResolve(promise);
return;
代码示例来源:origin: org.jboss.eap/wildfly-client-all
final Promise<List<T>> promise,
final Throwable cause) {
if (nameServerAddrStreamIndex >= nameServerAddrStream.size() || allowedQueries == 0 || promise.isCancelled()) {
tryToFinishResolve(nameServerAddrStream, nameServerAddrStreamIndex, question, queryLifecycleObserver,
promise, cause);
内容来源于网络,如有侵权,请联系作者删除!