@Test @Ignore public void testTop5() throws Exception { Span span = tracer.newTrace(); try (Tracer.SpanInScope ws = tracer.withSpanInScope(span)) { client.top5().get(15000, TimeUnit.MILLISECONDS); } finally { span.finish(); } span = tracer.newTrace(); try (Tracer.SpanInScope ws = tracer.withSpanInScope(span)) { client.top5().get(15000, TimeUnit.MILLISECONDS); } finally { span.finish(); } }
public CompletableFuture<List<LeaderboardEntry>> top5() { return Failsafe .with(currentRetryPolicy) .with(new TraceableScheduledExecutorService(beanFactory, EXECUTOR)) .onFailedAttempt(t -> LOG.error("Error fetching top 5", t)) .future(() -> top5Request().toFuture()); }
LeaderboardClient { public CompletableFuture<List<LeaderboardEntry>> top5() { return Failsafe .with(currentRetryPolicy) .with(new TraceableScheduledExecutorService(beanFactory, EXECUTOR)) .onFailedAttempt(t -> LOG.error("Error fetching top 5", t)) .future(() -> top5Request().toFuture()); } }
LeaderboardClient { public CompletableFuture<List<LeaderboardEntry>> top5() { return Failsafe .with(currentRetryPolicy) .with(new TraceableScheduledExecutorService(beanFactory, EXECUTOR)) .onFailedAttempt(t -> LOG.error("Error fetching top 5", t)) .future(() -> top5Request().toFuture()); } @Autowired  LeaderboardClient(
            @Value("${rest.leaderboard.host}") String leaderboardHost,
            @Value("${rest.leaderboard.port}") int leaderboardPort,
            WebClient webClientTemplate,
            BeanFactory beanFactory
    ); }
LeaderboardClient { public CompletableFuture<List<LeaderboardEntry>> top5() { return Failsafe .with(currentRetryPolicy) .with(new TraceableScheduledExecutorService(beanFactory, EXECUTOR)) .onFailedAttempt(t -> LOG.error("Error fetching top 5", t)) .future(() -> top5Request().toFuture()); } @Autowired  LeaderboardClient(
            @Value("${rest.leaderboard.host}") String leaderboardHost,
            @Value("${rest.leaderboard.port}") int leaderboardPort,
            WebClient webClientTemplate,
            BeanFactory beanFactory
    ); void disableRetries(); void enableRetriesWithNoBackoff(); CompletableFuture<List<LeaderboardEntry>> top5(); void updateScore(LeaderboardEntry newScore,
                            Runnable onMessage,
                            Consumer<? super Throwable> onError,
                            Runnable onComplete); }
LeaderboardClient { public CompletableFuture<List<LeaderboardEntry>> top5() { return Failsafe .with(currentRetryPolicy) .with(new TraceableScheduledExecutorService(beanFactory, EXECUTOR)) .onFailedAttempt(t -> LOG.error("Error fetching top 5", t)) .future(() -> top5Request().toFuture()); } @Autowired  LeaderboardClient(
            @Value("${rest.leaderboard.host}") String leaderboardHost,
            @Value("${rest.leaderboard.port}") int leaderboardPort,
            WebClient webClientTemplate,
            BeanFactory beanFactory
    ); void disableRetries(); void enableRetriesWithNoBackoff(); CompletableFuture<List<LeaderboardEntry>> top5(); void updateScore(LeaderboardEntry newScore,
                            Runnable onMessage,
                            Consumer<? super Throwable> onError,
                            Runnable onComplete);  }