我开始使用cyclops-react with async-retry。我还有点失落。
我使用SimpleReact并模拟服务器的超时但我从未收到类似这样的超时:
private List<Object> executeParallel() {
List<Object> result = new SimpleReact(mainThreadPool)
.of(getSupplier())
.withRetrier(new AsyncRetryExecutor(retryThreadPool)
.abortIf((t) -> !TimeoutException.class.isAssignableFrom(t.getClass()))
)
.retry(retrySupplier())
.block()
.collect(Collectors.toList());
return result;
}
private Supplier getSupplier() {
return () -> someOperationThatTimesOut();
}
private Function<Supplier, Object> retrySupplier() {
return supplier -> supplier.get();
}
那里缺少什么?