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
-
Method Summary
Modifier and TypeMethodDescription<T> T
Execute the supplieraction
within a transaction.<T> T
calculateAlways
(Supplier<T> action) Calculate inside a transaction if transactions supported - calculate anyway if transactions not supported.void
Execute the runnableaction
within a transaction.void
executeAlways
(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, wait
Methods inherited from interface org.apache.jena.graph.TransactionHandler
abort, begin, commit, transactionsSupported
-
Constructor Details
-
TransactionHandlerBase
public TransactionHandlerBase()
-
-
Method Details
-
execute
Execute the runnableaction
within a transaction. If it completes normally, commit the transaction, otherwise abort the transaction.- Specified by:
execute
in interfaceTransactionHandler
-
executeAlways
Execute inside a transaction if transactions supported - execute anyway if transactions not supported.- Specified by:
executeAlways
in interfaceTransactionHandler
-
calculate
Execute the supplieraction
within a transaction. If it completes normally, commit the transaction and return the result, otherwise abort the transaction.- Specified by:
calculate
in interfaceTransactionHandler
-
calculateAlways
Calculate inside a transaction if transactions supported - calculate anyway if transactions not supported.- Specified by:
calculateAlways
in interfaceTransactionHandler
-