@BetaApi public final class ExceptionHandler extends Object implements ResultRetryAlgorithm<Object>, Serializable
RetryHelper
.Modifier and Type | Class and Description |
---|---|
static class |
ExceptionHandler.Builder
ExceptionHandler builder.
|
static interface |
ExceptionHandler.Interceptor |
Modifier and Type | Method and Description |
---|---|
TimedAttemptSettings |
createNextAttempt(Throwable prevThrowable,
Object prevResponse,
TimedAttemptSettings prevSettings) |
boolean |
equals(Object obj) |
static ExceptionHandler |
getDefaultInstance()
Returns an instance which retry any checked exception and abort on any runtime exception.
|
int |
hashCode() |
static ExceptionHandler.Builder |
newBuilder() |
boolean |
shouldRetry(Throwable prevThrowable,
Object prevResponse) |
public boolean shouldRetry(Throwable prevThrowable, Object prevResponse)
shouldRetry
in interface ResultRetryAlgorithm<Object>
public TimedAttemptSettings createNextAttempt(Throwable prevThrowable, Object prevResponse, TimedAttemptSettings prevSettings)
createNextAttempt
in interface ResultRetryAlgorithm<Object>
public static ExceptionHandler getDefaultInstance()
public static ExceptionHandler.Builder newBuilder()
Copyright © 2019 Google LLC. All rights reserved.