public class TxnOp extends Object
| Constructor and Description |
|---|
TxnOp() |
| Modifier and Type | Method and Description |
|---|---|
static void |
compatibleWithPromote(TxnType requestedTxnType,
Transactional currentTxn)
Check an existing
Transactional for compatibility with a TxnType and
promote the Transactional if necessary. |
static boolean |
isTxnTypeCompatible(TxnType innerTxnType,
TxnType outerTxnType)
Check whether a
TxnType is compatible with another. |
static void |
txnTypeCompatibleEx(TxnType innerTxnType,
TxnType outerTxnType)
Check whether a
TxnType is compatible with another. |
public static void txnTypeCompatibleEx(TxnType innerTxnType, TxnType outerTxnType)
TxnType 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.innerTxnType - outerTxnType - JenaTransactionExceptionisTxnTypeCompatible(org.apache.jena.query.TxnType, org.apache.jena.query.TxnType),
compatibleWithPromote(org.apache.jena.query.TxnType, org.apache.jena.sparql.core.Transactional)public static boolean isTxnTypeCompatible(TxnType innerTxnType, TxnType outerTxnType)
TxnType 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 compatibleWithPromote(org.apache.jena.query.TxnType, org.apache.jena.sparql.core.Transactional)innerTxnType - outerTxnType - public static void compatibleWithPromote(TxnType requestedTxnType, Transactional currentTxn)
Transactional for compatibility with a TxnType and
promote the Transactional if necessary.
The Transactional does not need to already be in a transaction.
Throw a JenaTransactionException if not compatible (e.g. current READ, requesting a WRITE).requestedTxnType - currentTxn - JenaTransactionException - if not possible.Licenced under the Apache License, Version 2.0