Class RetryableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
tech.ydb.yoj.repository.db.exception.RepositoryException
tech.ydb.yoj.repository.db.exception.RetryableException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EntityAlreadyExistsException,OptimisticLockException
Base class for retryable database access exceptions.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRetryableException(String message) protectedRetryableException(String message, Throwable cause) protectedRetryableException(String message, RetryPolicy retryPolicy) protectedRetryableException(String message, RetryPolicy retryPolicy, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RetryableException
-
RetryableException
-
RetryableException
-
RetryableException
-
-
Method Details
-
sleep
public void sleep(int attempt) Sleeps for the recommended amount of time before retrying.- Parameters:
attempt- request attempt count (starting from 1)
-
rethrow
-