Class TransactionException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- java.lang.RuntimeException
- 
- org.apache.ignite.IgniteException
- 
- org.apache.ignite.transactions.TransactionException
 
 
 
 
 
- 
- All Implemented Interfaces:
- Serializable
 - Direct Known Subclasses:
- TransactionDeadlockException,- TransactionHeuristicException,- TransactionOptimisticException,- TransactionRollbackException,- TransactionTimeoutException
 
 public class TransactionException extends IgniteException Base class for all transaction related exceptions. In case ofCacheAtomicityMode.TRANSACTIONALcache - any method throwing this or nested exception have transactional behaviour (it can be rolled back and not seen outside transaction before committed). In case ofCacheAtomicityMode.ATOMICcache - every action is committed when it done.Before doing main thing, all transactional methods (commit, rollback and close) must obtain a readLock from context's gateway to prevent simultaneous actions which can break result of transaction. Then method delegates action to internal transaction representation which can fail in some cases and throw exception. Anyway, if there is success or fail, method must free gateway lock. TransactionDeadlockExceptionIf deadlock detected within transaction.TransactionHeuristicExceptionIf operation performs within transaction that entered an unknown state.TransactionOptimisticExceptionIf operation with optimistic behavior failed.TransactionRollbackExceptionIf operation performs within transaction that automatically rolled back.TransactionTimeoutExceptionIf operation performs within transaction and timeout occurred.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description TransactionException()Creates empty exception.TransactionException(String msg)Creates new exception with given error message.TransactionException(String msg, @Nullable Throwable cause)Creates new exception with given error message and optional nested exception.TransactionException(Throwable cause)Creates new transaction exception with given throwable as a cause and source of error message.
 - 
Method Summary- 
Methods inherited from class org.apache.ignite.IgniteExceptiongetCause, hasCause, toString
 - 
Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
- 
 
- 
- 
- 
Constructor Detail- 
TransactionExceptionpublic TransactionException() Creates empty exception.
 - 
TransactionExceptionpublic TransactionException(String msg) Creates new exception with given error message.- Parameters:
- msg- Error message.
 
 - 
TransactionExceptionpublic TransactionException(Throwable cause) Creates new transaction exception with given throwable as a cause and source of error message.- Parameters:
- cause- Non-null throwable cause.
 
 
- 
 
-