java.lang.Object
org.apache.jena.graph.impl.TransactionHandlerBase
- All Implemented Interfaces:
TransactionHandler
- Direct Known Subclasses:
BaseInfGraph.InfTransactionHandler,SimpleTransactionHandler
A base for transaction handlers; provide implementations of execute* operations
using the fundamental begin-commit-abort.
(This class predates java8 default methods.)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TExecute the supplieractionwithin a transaction.<T> TcalculateAlways(Supplier<T> action) Calculate inside a transaction if transactions supported - calculate anyway if transactions not supported.voidExecute the runnableactionwithin a transaction.voidexecuteAlways(Runnable action) Execute inside a transaction if transactions supported - execute anyway if transactions not supported.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jena.graph.TransactionHandler
abort, begin, commit, transactionsSupported
-
Constructor Details
-
TransactionHandlerBase
public TransactionHandlerBase()
-
-
Method Details
-
execute
Execute the runnableactionwithin a transaction. If it completes normally, commit the transaction, otherwise abort the transaction.- Specified by:
executein interfaceTransactionHandler
-
executeAlways
Execute inside a transaction if transactions supported - execute anyway if transactions not supported.- Specified by:
executeAlwaysin interfaceTransactionHandler
-
calculate
Execute the supplieractionwithin a transaction. If it completes normally, commit the transaction and return the result, otherwise abort the transaction.- Specified by:
calculatein interfaceTransactionHandler
-
calculateAlways
Calculate inside a transaction if transactions supported - calculate anyway if transactions not supported.- Specified by:
calculateAlwaysin interfaceTransactionHandler
-