public interface TransactionInfo
Transaction| Modifier and Type | Method and 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 chnage the mode.
|
default boolean |
isWriteTxn()
Is this a currently a WRITE transaction?
Convenience operation equivalent to
(getMode() == ReadWrite.WRITE) |
TxnState getState()
long getDataVersion()
boolean hasStarted()
boolean hasFinished()
boolean hasFinalised()
TxnId getTxnId()
TxnType getTxnType()
ReadWrite getMode()
READ to WRITE in a transactions lifetime.default boolean isReadTxn()
(getMode() == ReadWrite.READ)default boolean isWriteTxn()
(getMode() == ReadWrite.WRITE)default boolean isActiveTxn()
getState() != INACTIVELicensed under the Apache License, Version 2.0