@Test public void returnsImmediatelyIfPredicatePasses() throws ExecutionException { ListenableFuture<Integer> result = retrier.execute(function); future.set(0); scheduler.runUntilIdle(); assertThat(Futures.getDone(result)).isZero(); }
public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); }
AsyncRetrier { public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); } }
AsyncRetrier { public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); } AsyncRetrier(
            int maxAttempts,
            Duration delayBetweenAttempts,
            ListeningScheduledExecutorService schedulingExecutor,
            ListeningExecutorService executionExecutor,
            Predicate<T> predicate); }
AsyncRetrier { public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); } AsyncRetrier(
            int maxAttempts,
            Duration delayBetweenAttempts,
            ListeningScheduledExecutorService schedulingExecutor,
            ListeningExecutorService executionExecutor,
            Predicate<T> predicate); ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier); }
AsyncRetrier { public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) { return execute(supplier, maxAttempts); } AsyncRetrier(
            int maxAttempts,
            Duration delayBetweenAttempts,
            ListeningScheduledExecutorService schedulingExecutor,
            ListeningExecutorService executionExecutor,
            Predicate<T> predicate); ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier);  }