Interface TransactionInfo
- All Known Implementing Classes:
Transaction
public interface TransactionInfo
A view that provides information about a transaction
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionlongEach transaction is allocated a serialization point by the transaction coordinator.org.apache.jena.query.ReadWritegetMode()What mode is this transaction?getState()The transaction lifecycle stategetTxnId()Get the transaction id for this transaction.org.apache.jena.query.TxnTypeWhat type is this transaction?booleanHas the transaction gone through all lifecycle states?booleanHas the transaction finished (has commit/abort/end been called)?booleanHas the transaction started?default booleanIs this a view of a transaction that is active?default booleanIs this currently a READ transaction?default booleanIs this a currently a WRITE transaction?
-
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
org.apache.jena.query.TxnType getTxnType()What type is this transaction? This is the initial TxnType and does not change during a transaction's lifetime. -
getMode
org.apache.jena.query.ReadWrite getMode()What mode is this transaction? This may change fromREADtoWRITEin 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 togetState() != INACTIVE
-