public class RetryTransactionException extends KVTransactionException
KVTransaction
results
in a conflict or other condition requiring that the transaction be retried.
Note: although it is usually the case, a RetryTransactionException
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
RetryTransactionException
. 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.
Constructor and Description |
---|
RetryTransactionException(KVTransaction kvt) |
RetryTransactionException(KVTransaction kvt,
String message) |
RetryTransactionException(KVTransaction kvt,
String message,
Throwable cause) |
RetryTransactionException(KVTransaction kvt,
Throwable cause) |
Modifier and Type | Method and Description |
---|---|
RetryTransactionException |
duplicate()
Create a duplicate of this exception, with the current thread's stack frames prepended.
|
getTransaction
getStore
clone, rethrow
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public RetryTransactionException(KVTransaction kvt)
public RetryTransactionException(KVTransaction kvt, Throwable cause)
public RetryTransactionException(KVTransaction kvt, String message)
public RetryTransactionException(KVTransaction kvt, String message, Throwable cause)
public RetryTransactionException duplicate()
KVException
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.
duplicate
in class KVTransactionException
ThrowableUtil.prependCurrentStackTrace(java.lang.Throwable)
Copyright © 2022. All rights reserved.