Package org.apache.derby.jdbc
Class XATransactionState.CleanupOrCancelMonitor
- java.lang.Object
-
- org.apache.derby.jdbc.XATransactionState.CleanupOrCancelMonitor
-
- Enclosing class:
- XATransactionState
private static class XATransactionState.CleanupOrCancelMonitor extends java.lang.ObjectA class used to monitor if the transaction is in the middle of cancelling or cleaning up on an error. See DERBY-6879
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.LongcancelThreadIdprivate java.lang.LongcleanupThreadId
-
Constructor Summary
Constructors Modifier Constructor Description privateCleanupOrCancelMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanokToCancel()See if it is ok to cancel.private booleanokToCleanup()See if it is ok to cleanup.
-
-
-
Method Detail
-
okToCancel
public boolean okToCancel()
See if it is ok to cancel. It is okay to cancel if the transaction is not cleaning up from an error. The assumption is that if the cleanUpOnError is/has been invoked, then there is no reason for the cancel to be processed as the transaction is going to end (ab)normally.- Returns:
trueif it is okay to cancel.
-
okToCleanup
private boolean okToCleanup()
See if it is ok to cleanup. It is okay to cleanup if the transaction is not cancelling. The assumption is that if the cancel is/has been invoked, then there is no reason to try to mark the transaction as being in error. The transaction will be cancelled in any case.- Returns:
trueif it is okay to cleanup.
-
-