Class ExceptionHandler (2.8.4)

public final class ExceptionHandler implements ResultRetryAlgorithm<Object>, Serializable

Exception retry algorithm implementation used by RetryHelper.

Inheritance

Object > ExceptionHandler

Implements

com.google.api.gax.retrying.ResultRetryAlgorithm<java.lang.Object>, Serializable

Static Methods

getDefaultInstance()

public static ExceptionHandler getDefaultInstance()

Returns an instance which retry any checked exception and abort on any runtime exception.

Returns
TypeDescription
ExceptionHandler

newBuilder()

public static ExceptionHandler.Builder newBuilder()
Returns
TypeDescription
ExceptionHandler.Builder

Methods

createNextAttempt(Throwable prevThrowable, Object prevResponse, TimedAttemptSettings prevSettings)

public TimedAttemptSettings createNextAttempt(Throwable prevThrowable, Object prevResponse, TimedAttemptSettings prevSettings)
Parameters
NameDescription
prevThrowableThrowable
prevResponseObject
prevSettingsTimedAttemptSettings
Returns
TypeDescription
TimedAttemptSettings

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

shouldRetry(Throwable prevThrowable, Object prevResponse)

public boolean shouldRetry(Throwable prevThrowable, Object prevResponse)
Parameters
NameDescription
prevThrowableThrowable
prevResponseObject
Returns
TypeDescription
boolean