Interface TransactionInfo

All Known Implementing Classes:
Transaction

public interface TransactionInfo
A view that provides information about a transaction
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Each transaction is allocated a serialization point by the transaction coordinator.
    What mode is this transaction? This may change from READ to WRITE in a transactions lifetime.
    The transaction lifecycle state
    Get the transaction id for this transaction.
    What type is this transaction? This is the initial TxnType and does not change during a transaction's lifetime.
    boolean
    Has the transaction gone through all lifecycle states?
    boolean
    Has the transaction finished (has commit/abort/end been called)?
    boolean
    Has the transaction started?
    default boolean
    Is this a view of a transaction that is active? Equivalent to getState() != INACTIVE
    default boolean
    Is this currently a READ transaction? Promotion may change the mode.
    default boolean
    Is this a currently a WRITE transaction? Convenience operation equivalent to (getMode() == ReadWrite.WRITE)
  • Method Details

    • getState

      TxnState getState()
      The transaction lifecycle state
    • getDataVersion

      long getDataVersion()
      Each transaction is allocated a serialization point by the transaction coordinator. Normally, this is related to this number and it increases over time as the data changes. Two readers can have the same serialization point - they are working with the same view of the data.
    • hasStarted

      boolean hasStarted()
      Has the transaction started?
    • hasFinished

      boolean hasFinished()
      Has the transaction finished (has commit/abort/end been called)?
    • hasFinalised

      boolean hasFinalised()
      Has the transaction gone through all lifecycle states?
    • getTxnId

      TxnId getTxnId()
      Get the transaction id for this transaction. Unique within this OS process (JVM) at least .
    • getTxnType

      TxnType getTxnType()
      What type is this transaction? This is the initial TxnType and does not change during a transaction's lifetime.
    • getMode

      ReadWrite getMode()
      What mode is this transaction? This may change from READ to WRITE in a transactions lifetime.
    • isReadTxn

      default boolean isReadTxn()
      Is this currently a READ transaction? Promotion may change the mode. Convenience operation equivalent to (getMode() == ReadWrite.READ)
    • isWriteTxn

      default boolean isWriteTxn()
      Is this a currently a WRITE transaction? Convenience operation equivalent to (getMode() == ReadWrite.WRITE)
    • isActiveTxn

      default boolean isActiveTxn()
      Is this a view of a transaction that is active? Equivalent to getState() != INACTIVE