Class TransactionalBase
java.lang.Object
org.apache.jena.dboe.transaction.txn.TransactionalBase
- All Implemented Interfaces:
Transactional,TransactionalSystem,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
Transactional.Promote -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidabort()voidattach(TransactionCoordinatorState coordinatorState) Attach a transaction to this thread.final voidfinal voidfinal 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(Transactional.Promote promoteMode) voidshutdown()Shutdown component, aborting any in-progress transactions.Methods 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
- Specified by:
beginin interfaceTransactional
-
begin
- Specified by:
beginin interfaceTransactional
-
promote
public final boolean promote()- Specified by:
promotein interfaceTransactional
-
promote
- Specified by:
promotein interfaceTransactional
-
commit
public final void commit()- Specified by:
commitin interfaceTransactional- 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 interfaceTransactional
-
end
public final void end()- Specified by:
endin interfaceTransactional
-
transactionMode
- Specified by:
transactionModein interfaceTransactional
-
transactionType
- Specified by:
transactionTypein interfaceTransactional
-
isInTransaction
public boolean isInTransaction()- Specified by:
isInTransactionin interfaceTransactional
-
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.
-