java.lang.Object
org.apache.jena.system.TxnOp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcompatibleWithPromote(TxnType requestedTxnType, Transactional currentTxn) Check an existingTransactionalfor compatibility with aTxnTypeand promote theTransactionalif necessary.static booleanisTxnTypeCompatible(TxnType innerTxnType, TxnType outerTxnType) Check whether aTxnTypeis compatible with another.static voidtxnTypeCompatibleEx(TxnType innerTxnType, TxnType outerTxnType) Check whether aTxnTypeis compatible with another.
-
Constructor Details
-
TxnOp
public TxnOp()
-
-
Method Details
-
txnTypeCompatibleEx
Check whether aTxnTypeis compatible with another. Typically the "inner" transaction is a requested new transaction and the outer one an existing transaction. Throw an exception if not compatible.- Parameters:
innerTxnType-outerTxnType-- Throws:
JenaTransactionException- See Also:
-
isTxnTypeCompatible
Check whether aTxnTypeis compatible with another. Typically then "inner" transaction is a requested new transaction and the outer one an existing transaction. A TxnType is compatible with (can run inside) another TxnType (for an an existing or outer transaction) if: the outer one covers the needs of the inner one
READ < PROMOTE (either) < WRITE < no outer In particular: Inner is READ works with any outer. Outer is WRITE works with any inner. For promoting if necessary, seecompatibleWithPromote(org.apache.jena.query.TxnType, org.apache.jena.sparql.core.Transactional)- Parameters:
innerTxnType-outerTxnType-
-
compatibleWithPromote
Check an existingTransactionalfor compatibility with aTxnTypeand promote theTransactionalif necessary. TheTransactionaldoes not need to already be in a transaction. Throw aJenaTransactionExceptionif not compatible (e.g. current READ, requesting a WRITE).- Parameters:
requestedTxnType-currentTxn-- Throws:
JenaTransactionException- if not possible.
-