All Implemented Interfaces:
Reapable
Direct Known Subclasses:
SubordinateAtomicAction

public class SubordinateAtomicAction extends AtomicAction
A subordinate JTA transaction; used when importing another transaction context.
Author:
mcl
  • Constructor Details

    • SubordinateAtomicAction

      public SubordinateAtomicAction()
    • SubordinateAtomicAction

      public SubordinateAtomicAction(int timeout)
    • SubordinateAtomicAction

      protected SubordinateAtomicAction(Uid actId)
      For crash recovery purposes.
      Parameters:
      actId - the identifier to recover.
  • Method Details

    • commit

      public int commit()
      Commit the transaction, and have heuristic reporting. Heuristic reporting via the return code is enabled.
      Overrides:
      commit in class AtomicAction
      Returns:
      ActionStatus indicating outcome.
    • commit

      public int commit(boolean report_heuristics)
      Commit the transaction. The report_heuristics parameter can be used to determine whether or not heuristic outcomes are reported. If the transaction has already terminated, or has not begun, then an appropriate error code will be returned.
      Overrides:
      commit in class AtomicAction
      Returns:
      ActionStatus indicating outcome.
    • abort

      public int abort()
      Abort (rollback) the transaction. If the transaction has already terminated, or has not been begun, then an appropriate error code will be returned.
      Overrides:
      abort in class AtomicAction
      Returns:
      ActionStatus indicating outcome.
    • type

      public String type()
      The type of the class is used to locate the state of the transaction log in the object store. Overloads BasicAction.type()
      Overrides:
      type in class AtomicAction
      Returns:
      a string representation of the hierarchy of the class for storing logs in the transaction object store.
    • doPrepare

      public int doPrepare()
    • doCommit

      public int doCommit()
    • doRollback

      public int doRollback()
    • doOnePhaseCommit

      public int doOnePhaseCommit()
    • doForget

      public void doForget()
      Deprecated.
      Only called via tests
    • doBeforeCompletion

      public boolean doBeforeCompletion()
    • checkForCurrent

      protected boolean checkForCurrent()
      By default the BasicAction class only allows the termination of a transaction if it's the one currently associated with the thread. We override this here.
      Overrides:
      checkForCurrent in class AtomicAction
      Returns:
      false to indicate that this transaction can only be terminated by the right thread.
    • activated

      public boolean activated()