Package com.google.cloud
Class ExceptionHandler
java.lang.Object
com.google.cloud.ExceptionHandler
- All Implemented Interfaces:
ResultRetryAlgorithm<Object>,Serializable
@BetaApi
public final class ExceptionHandler
extends Object
implements ResultRetryAlgorithm<Object>, Serializable
Exception retry algorithm implementation used by
RetryHelper.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classExceptionHandler builder.static interface -
Method Summary
Modifier and TypeMethodDescriptioncreateNextAttempt(Throwable prevThrowable, Object prevResponse, TimedAttemptSettings prevSettings) booleanstatic ExceptionHandlerReturns an instance which retry any checked exception and abort on any runtime exception.inthashCode()static ExceptionHandler.BuilderbooleanshouldRetry(Throwable prevThrowable, Object prevResponse)
-
Method Details
-
shouldRetry
- Specified by:
shouldRetryin interfaceResultRetryAlgorithm<Object>
-
createNextAttempt
public TimedAttemptSettings createNextAttempt(Throwable prevThrowable, Object prevResponse, TimedAttemptSettings prevSettings) - Specified by:
createNextAttemptin interfaceResultRetryAlgorithm<Object>
-
hashCode
public int hashCode() -
equals
-
getDefaultInstance
Returns an instance which retry any checked exception and abort on any runtime exception. -
newBuilder
-