本文整理汇总了Java中com.ning.http.client.ListenableFuture.isDone方法的典型用法代码示例。如果您正苦于以下问题:Java ListenableFuture.isDone方法的具体用法?Java ListenableFuture.isDone怎么用?Java ListenableFuture.isDone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ning.http.client.ListenableFuture
的用法示例。
在下文中一共展示了ListenableFuture.isDone方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onTimeout
import com.ning.http.client.ListenableFuture; //导入方法依赖的package包/类
private void onTimeout() {
// complete missing answers and return ...
log.logMessage("Timeout in aggregating service, only received answers from " + noOfResults.get() + " out of total " + noOfCalls + " expected responses.");
int i = 0;
for (ListenableFuture<Response> executor : concurrentExecutors) {
if (!executor.isDone()) {
log.logMessage("Cancel asych request #" + i);
executor.cancel(true);
}
i++;
}
onAllCompleted();
}
开发者ID:callistaenterprise,项目名称:blog-non-blocking-rest-service-with-spring-mvc,代码行数:15,代码来源:Executor.java
示例2: onTimeout
import com.ning.http.client.ListenableFuture; //导入方法依赖的package包/类
public void onTimeout() {
// complete missing answers and return ...
log.logMessage("Timeout in aggregating service, only received answers from " + noOfResults.get() + " out of total " + noOfCalls + " expected responses.");
int i = 0;
for (ListenableFuture<Response> executor : executors) {
if (!executor.isDone()) {
log.logMessage("Cancel asych request #" + i);
executor.cancel(true);
}
i++;
}
onAllCompleted();
}
开发者ID:callistaenterprise,项目名称:blog-non-blocking-rest-service-with-spring-mvc,代码行数:15,代码来源:AggregatorEventHandler.java
示例3: onTimeout
import com.ning.http.client.ListenableFuture; //导入方法依赖的package包/类
private void onTimeout() {
LOG.debug("Timeout! Cancel ongoing requests!");
// complete missing answers and return ...
int i = 0;
for (ListenableFuture<Response> request : concurrentRequests) {
if (!request.isDone()) {
LOG.debug("Cancel a request due to timeout!");
request.cancel(true);
}
i++;
}
onAllCompleted();
}
开发者ID:callistaenterprise,项目名称:blog-reactive,代码行数:16,代码来源:AggregatorNonBlockingCallbackController.java