fork download
  1. private String getOncallResponseWithRetry(String oncallLink) throws ExecutionException, RetryException {
  2. Predicate<String> empty = StringUtils::isBlank;
  3. Retryer<String> retryer = RetryerBuilder.<String>newBuilder()
  4. .retryIfExceptionOfType(Exception.class)
  5. .retryIfResult(empty)
  6. .withWaitStrategy(WaitStrategies.exponentialWait(2, INVOKE_RETRY_INTERVAL_SECONDS, TimeUnit.SECONDS))
  7. .withStopStrategy(StopStrategies.stopAfterAttempt(INVOKE_MAX_RETRY))
  8. .build();
  9.  
  10. return retryer.call(() -> {
  11. return method().getString();
  12. });
  13.  
  14.  
  15. private static final long INVOKE_RETRY_INTERVAL_SECONDS = 3;
  16. private static final int INVOKE_MAX_RETRY = 4;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
private String getOncallResponseWithRetry(String oncallLink) throws ExecutionException, RetryException {
        ^
Main.java:3: error: class, interface, or enum expected
        Retryer<String> retryer = RetryerBuilder.<String>newBuilder()
        ^
Main.java:4: error: <identifier> expected
                .retryIfExceptionOfType(Exception.class)
                                                       ^
Main.java:10: error: illegal start of type
        return retryer.call(() -> {
        ^
Main.java:10: error: <identifier> expected
        return retryer.call(() -> {
                           ^
Main.java:10: error: illegal start of type
        return retryer.call(() -> {
                            ^
Main.java:12: error: illegal start of type
        });
         ^
Main.java:16: error: reached end of file while parsing
    private static final int INVOKE_MAX_RETRY = 4;
                                                  ^
8 errors
stdout
Standard output is empty