Package io.permazen.kv
Class RetryKVTransactionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.permazen.kv.KVException
io.permazen.kv.KVDatabaseException
io.permazen.kv.KVTransactionException
io.permazen.kv.RetryKVTransactionException
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
TransactionConflictException
Exception thrown when an attempt to access a
KVTransaction
results
in a conflict or other condition requiring that the transaction be retried.
Note: although it is usually the case, a RetryKVTransactionException
does not necessarily mean that the transaction failed. In some situations
(e.g., involving failed network communication) it may not be possible to determine
whether a transaction succeeded or not, and this situation is indicated by throwing a
RetryKVTransactionException
. Whether and how often such a "false negative" can
occur is a function of the KVDatabase
implementation being used; ideally, all
transactions are idempotent and therefore correct in either case.
- See Also:
-
Constructor Summary
ConstructorDescriptionRetryKVTransactionException
(KVTransaction kvt, String message) RetryKVTransactionException
(KVTransaction kvt, String message, Throwable cause) RetryKVTransactionException
(KVTransaction kvt, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionCreate a duplicate of this exception, with the current thread's stack frames prepended.Methods inherited from class io.permazen.kv.KVTransactionException
getTransaction
Methods inherited from class io.permazen.kv.KVDatabaseException
getStore
Methods inherited from class io.permazen.kv.KVException
clone, rethrow
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RetryKVTransactionException
-
RetryKVTransactionException
-
RetryKVTransactionException
-
RetryKVTransactionException
-
-
Method Details
-
duplicate
Description copied from class:KVException
Create a duplicate of this exception, with the current thread's stack frames prepended.This allows the "same" exception to be thrown multiple times from different locations with different outer stack frames. The
KVException.clone()
method is used to copy this instance.- Overrides:
duplicate
in classKVTransactionException
- Returns:
- duplicate of this exception with the current thread's stack frame context
- See Also:
-