Class TransactionalBase
java.lang.Object
org.apache.jena.dboe.transaction.txn.TransactionalBase
- All Implemented Interfaces:
Transactional,TransactionalSystem,org.apache.jena.sparql.core.Transactional
Framework for implementing a
Transactional via TransactionalSystem.
This base class provides the "per thread" aspect - the TransactionCoordinator itself
is not thread aware.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.sparql.core.Transactional
org.apache.jena.sparql.core.Transactional.Promote -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidabort()voidattach(TransactionCoordinatorState coordinatorState) Attach a transaction to this thread.final voidbegin(org.apache.jena.query.ReadWrite readWrite) final voidbegin(org.apache.jena.query.TxnType txnType) final voidcommit()voidDo the 2-phase "commit" stepvoidDo the 2-phase "prepare" step after which the transaction coordinator decides whether to commit or abort.detach()Suspend this transaction, detaching from the current thread.final voidend()final TransactionReturn the transaction object for this thread.final TransactionInfoReturn an information view of the transaction for this thread, if any.Get the associatedTransactionCoordinatorbooleanfinal booleanpromote()final booleanpromote(org.apache.jena.sparql.core.Transactional.Promote promoteMode) voidshutdown()Shutdown component, aborting any in-progress transactions.org.apache.jena.query.ReadWriteorg.apache.jena.query.TxnTypeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jena.sparql.core.Transactional
begin, calc, calculate, calculateRead, calculateWrite, exec, execute, executeRead, executeWrite
-
Constructor Details
-
TransactionalBase
-
TransactionalBase
-
-
Method Details
-
getTxnMgr
Description copied from interface:TransactionalSystemGet the associatedTransactionCoordinator- Specified by:
getTxnMgrin interfaceTransactionalSystem
-
detach
Description copied from interface:TransactionalSystemSuspend this transaction, detaching from the current thread. A new transaction on this thread can performed but the detached transaction still exists and if it is a write transaction it can still block other write transactions.- Specified by:
detachin interfaceTransactionalSystem
-
attach
Description copied from interface:TransactionalSystemAttach a transaction to this thread. A transaction system implementation usually imposes a rule that only one thread can have a transaction attached at a time.- Specified by:
attachin interfaceTransactionalSystem
-
begin
public final void begin(org.apache.jena.query.ReadWrite readWrite) - Specified by:
beginin interfaceorg.apache.jena.sparql.core.Transactional
-
begin
public final void begin(org.apache.jena.query.TxnType txnType) - Specified by:
beginin interfaceorg.apache.jena.sparql.core.Transactional
-
promote
public final boolean promote()- Specified by:
promotein interfaceorg.apache.jena.sparql.core.Transactional
-
promote
public final boolean promote(org.apache.jena.sparql.core.Transactional.Promote promoteMode) - Specified by:
promotein interfaceorg.apache.jena.sparql.core.Transactional
-
commit
public final void commit()- Specified by:
commitin interfaceorg.apache.jena.sparql.core.Transactional- Specified by:
commitin interfaceTransactionalSystem
-
commitPrepare
public void commitPrepare()Description copied from interface:TransactionalSystemDo the 2-phase "prepare" step after which the transaction coordinator decides whether to commit or abort. A TransactionalSystem must be prepared for both possibilities.- Specified by:
commitPreparein interfaceTransactionalSystem
-
commitExec
public void commitExec()Description copied from interface:TransactionalSystemDo the 2-phase "commit" step- Specified by:
commitExecin interfaceTransactionalSystem
-
abort
public final void abort()- Specified by:
abortin interfaceorg.apache.jena.sparql.core.Transactional
-
end
public final void end()- Specified by:
endin interfaceorg.apache.jena.sparql.core.Transactional
-
transactionMode
public org.apache.jena.query.ReadWrite transactionMode()- Specified by:
transactionModein interfaceorg.apache.jena.sparql.core.Transactional
-
transactionType
public org.apache.jena.query.TxnType transactionType()- Specified by:
transactionTypein interfaceorg.apache.jena.sparql.core.Transactional
-
isInTransaction
public boolean isInTransaction()- Specified by:
isInTransactionin interfaceorg.apache.jena.sparql.core.Transactional
-
getTransactionInfo
Description copied from interface:TransactionalSystemReturn an information view of the transaction for this thread, if any. Returns null when there is no active transaction for this tread.- Specified by:
getTransactionInfoin interfaceTransactionalSystem
-
getThreadTransaction
Description copied from interface:TransactionalSystemReturn the transaction object for this thread. Low-level use only. To get information about the current transaction, callTransactionalSystem.getTransactionInfo().- Specified by:
getThreadTransactionin interfaceTransactionalSystem
-
shutdown
public void shutdown()Shutdown component, aborting any in-progress transactions. This operation is not guaranteed to be called.
-