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 class
ExceptionHandler.Builder
ExceptionHandler builder.static interface
ExceptionHandler.Interceptor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.gax.retrying.TimedAttemptSettings
createNextAttempt(Throwable prevThrowable, Object prevResponse, com.google.api.gax.retrying.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)
-
-
-
Method Detail
-
shouldRetry
public boolean shouldRetry(Throwable prevThrowable, Object prevResponse)
- Specified by:
shouldRetry
in 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:
createNextAttempt
in 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()
-
-