Interface TransactionInfo

  • All Known Implementing Classes:
    Transaction

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

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

      • 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