Class RetryableException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- software.amazon.awssdk.core.exception.SdkException
-
- software.amazon.awssdk.core.exception.SdkClientException
-
- software.amazon.awssdk.core.exception.RetryableException
-
- All Implemented Interfaces:
Serializable
public final class RetryableException extends SdkClientException
Extension ofSdkException
that can be used by clients to explicitly have an exception retried. This exception will never be thrown by the SDK unless explicitly used by the client. SeeNonRetryableException
for marking non-retryable exceptions.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RetryableException.Builder
protected static class
RetryableException.BuilderImpl
-
Constructor Summary
Constructors Modifier Constructor Description protected
RetryableException(RetryableException.Builder b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RetryableException.Builder
builder()
static RetryableException
create(String message)
static RetryableException
create(String message, Throwable cause)
boolean
retryable()
Specifies whether or not an exception can be expected to succeed on a retry.RetryableException.Builder
toBuilder()
Create aSdkClientException.Builder
initialized with the properties of thisSdkClientException
.-
Methods inherited from class software.amazon.awssdk.core.exception.SdkClientException
getMessage
-
Methods inherited from class software.amazon.awssdk.core.exception.SdkException
numAttempts, rawMessage
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
RetryableException
protected RetryableException(RetryableException.Builder b)
-
-
Method Detail
-
create
public static RetryableException create(String message)
-
create
public static RetryableException create(String message, Throwable cause)
-
retryable
public boolean retryable()
Description copied from class:SdkException
Specifies whether or not an exception can be expected to succeed on a retry.- Overrides:
retryable
in classSdkException
-
toBuilder
public RetryableException.Builder toBuilder()
Description copied from class:SdkClientException
Create aSdkClientException.Builder
initialized with the properties of thisSdkClientException
.- Overrides:
toBuilder
in classSdkClientException
- Returns:
- A new builder initialized with this config's properties.
-
builder
public static RetryableException.Builder builder()
-
-