Package com.google.cloud
Class ExceptionHandler
- java.lang.Object
-
- com.google.cloud.ExceptionHandler
-
- All Implemented Interfaces:
com.google.api.gax.retrying.ResultRetryAlgorithm<Object>,Serializable
@BetaApi public final class ExceptionHandler extends Object implements com.google.api.gax.retrying.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 com.google.api.gax.retrying.TimedAttemptSettingscreateNextAttempt(Throwable prevThrowable, Object prevResponse, com.google.api.gax.retrying.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 interfacecom.google.api.gax.retrying.ResultRetryAlgorithm<Object>
-
createNextAttempt
public com.google.api.gax.retrying.TimedAttemptSettings createNextAttempt(Throwable prevThrowable, Object prevResponse, com.google.api.gax.retrying.TimedAttemptSettings prevSettings)
- Specified by:
createNextAttemptin interfacecom.google.api.gax.retrying.ResultRetryAlgorithm<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()
-
-