Class ExceptionHandler (2.3.5)

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

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

getDefaultInstance()

public static ExceptionHandler getDefaultInstance()

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

Returns
TypeDescription
ExceptionHandler

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

newBuilder()

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

shouldRetry(Throwable prevThrowable, Object prevResponse)

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