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

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

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

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);

相关文章