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 byRetryHelper.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExceptionHandler.BuilderExceptionHandler builder.static interfaceExceptionHandler.Interceptor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TimedAttemptSettingscreateNextAttempt(Throwable prevThrowable, Object prevResponse, TimedAttemptSettings prevSettings)booleanequals(Object obj)static ExceptionHandlergetDefaultInstance()Returns an instance which retry any checked exception and abort on any runtime exception.inthashCode()static ExceptionHandler.BuildernewBuilder()booleanshouldRetry(Throwable prevThrowable, Object prevResponse)
-
-
-
Method Detail
-
shouldRetry
public boolean shouldRetry(Throwable prevThrowable, Object prevResponse)
- Specified by:
shouldRetryin interfaceResultRetryAlgorithm<Object>
-
createNextAttempt
public TimedAttemptSettings createNextAttempt(Throwable prevThrowable, Object prevResponse, TimedAttemptSettings prevSettings)
- Specified by:
createNextAttemptin interfaceResultRetryAlgorithm<Object>
-
getDefaultInstance
public static ExceptionHandler getDefaultInstance()
Returns an instance which retry any checked exception and abort on any runtime exception.
-
newBuilder
public static ExceptionHandler.Builder newBuilder()
-
-