Class FDBExceptions
- java.lang.Object
-
- com.apple.foundationdb.record.provider.foundationdb.FDBExceptions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FDBExceptions.FDBStoreException
Exceptions that are reported by (or due to limitations of, etc.) the FDB API.static class
FDBExceptions.FDBStoreKeySizeException
Exception thrown when key size is exceeded.static class
FDBExceptions.FDBStoreRetriableException
An exception that should be retried by the caller because is stems from a transient condition in FDB.static class
FDBExceptions.FDBStoreTransactionConflictException
Transaction failed due to a conflict with another transaction.static class
FDBExceptions.FDBStoreTransactionIsTooOldException
Transaction is too old to perform reads or be committed.static class
FDBExceptions.FDBStoreTransactionSizeException
Exception thrown when transaction size is exceeded.static class
FDBExceptions.FDBStoreTransactionTimeoutException
Exception thrown when a transaction times out.static class
FDBExceptions.FDBStoreValueSizeException
Exception thrown when value size is exceeded.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FDBException
getFDBCause(Throwable ex)
static boolean
isRetriable(Throwable ex)
Returns whether an exception is retriable or is caused by a retriable error.static RuntimeException
wrapException(Throwable ex)
-
-
-
Method Detail
-
wrapException
public static RuntimeException wrapException(@Nonnull Throwable ex)
-
isRetriable
public static boolean isRetriable(@Nullable Throwable ex)
Returns whether an exception is retriable or is caused by a retriable error. This will walk up the exception hierarchy and returntrue
if it finds an exception that it knows to be retriable. This could occur, for example, if the given exception is caused by a retriableFDBException
such as a network failure or a recovery.- Parameters:
ex
- the exception to check for a retriable cause- Returns:
true
if this exception was caused by something retriable andfalse
otherwise
-
getFDBCause
@Nullable public static FDBException getFDBCause(@Nullable Throwable ex)
-
-