Package org.apache.ignite.tx
Class TransactionFinishedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.ignite.lang.IgniteException
org.apache.ignite.tx.TransactionException
org.apache.ignite.tx.TransactionFinishedException
- All Implemented Interfaces:
Serializable,TraceableException,RetriableTransactionException
public class TransactionFinishedException
extends TransactionException
implements RetriableTransactionException
Thrown when an operation cannot proceed because its transaction has already been finished (aborted, timed out, or killed).
The failed operation can never succeed under the same transaction, so retrying it as-is (for example, replaying the same
replica request) is pointless and must not happen. What is expected to succeed is retrying the whole transactional closure
with a new transaction — for example, via IgniteTransactions.runInTransaction(java.util.function.Consumer<org.apache.ignite.tx.Transaction>) — which is why this class implements
RetriableTransactionException.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionFinishedException(int code, String message, @Nullable Throwable cause) Creates the exception.TransactionFinishedException(UUID traceId, int code, String message, @Nullable Throwable cause) Creates the exception. -
Method Summary
Methods inherited from class org.apache.ignite.lang.IgniteException
code, codeAsString, errorCode, groupCode, groupName, toString, traceIdMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
TransactionFinishedException
Creates the exception.- Parameters:
code- Full error code from theTX_ALREADY_FINISHED_*family.message- Detail message.cause- Optional underlying cause (e.g. the error that aborted the transaction).
-
TransactionFinishedException
public TransactionFinishedException(UUID traceId, int code, String message, @Nullable @Nullable Throwable cause) Creates the exception.- Parameters:
traceId- Trace ID.code- Full error code.message- Detail message.cause- Optional underlying cause.
-