java.lang.Object
org.apache.jena.system.TxnOp
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
compatibleWithPromote
(TxnType requestedTxnType, Transactional currentTxn) Check an existingTransactional
for compatibility with aTxnType
and promote theTransactional
if necessary.static boolean
isTxnTypeCompatible
(TxnType innerTxnType, TxnType outerTxnType) Check whether aTxnType
is compatible with another.static void
txnTypeCompatibleEx
(TxnType innerTxnType, TxnType outerTxnType) Check whether aTxnType
is compatible with another.
-
Constructor Details
-
TxnOp
public TxnOp()
-
-
Method Details
-
txnTypeCompatibleEx
Check whether aTxnType
is 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 aTxnType
is 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 existingTransactional
for compatibility with aTxnType
and promote theTransactional
if necessary. TheTransactional
does not need to already be in a transaction. Throw aJenaTransactionException
if not compatible (e.g. current READ, requesting a WRITE).- Parameters:
requestedTxnType
-currentTxn
-- Throws:
JenaTransactionException
- if not possible.
-