Class XATransactionState.CleanupOrCancelMonitor

  • Enclosing class:
    XATransactionState

    private static class XATransactionState.CleanupOrCancelMonitor
    extends java.lang.Object
    A class used to monitor if the transaction is in the middle of cancelling or cleaning up on an error. See DERBY-6879
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean okToCancel()
      See if it is ok to cancel.
      private boolean okToCleanup()
      See if it is ok to cleanup.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cancelThreadId

        private java.lang.Long cancelThreadId
      • cleanupThreadId

        private java.lang.Long cleanupThreadId
    • Constructor Detail

      • CleanupOrCancelMonitor

        private CleanupOrCancelMonitor()
    • 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:
        true if 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:
        true if it is okay to cleanup.