I'm starting to use cyclops-react with async-retry. I'm still a little bit lost with it.
I'm using SimpleReact and simulating a timeout from the server but I never receive a timeout with something like this:
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();
}
What is missing there?