java.lang.Object
org.apache.jena.tdb1.sys.StoreConnection
A StoreConnection is the reference to the underlying storage.
There is JVM-wide cache of backing datasets.
The work of transaction coordination is done in TransactionManager.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicate whether there are any active transactions.begin(org.apache.jena.query.TxnType mode) Begin a transaction.Begin a transaction, giving it a label.static StoreConnectionReturn a StoreConnection backed by in-memory datastructures (for testing).static voidStop managing a location.voidflush()Flush the delayed write queue to the base storage.voidFlush the journal regardless - use with great case - do not use when transactions may be active.Internal operation - to get a dataset for application use, call aTDB1Factoryfunction.static StoreConnectiongetExisting(Location location) Return the StoreConnection if one already exists for this location, else return nullFor internal use onlyReturn a description of the transaction manager statebooleanbooleanisValid()static StoreConnectionObtain a StoreConnection for a particular locationstatic StoreConnectionMake a StoreConnection based on any StoreParams at the location or the system defaults.static StoreConnectionmake(Location location, StoreParams params) Return a StoreConnection for a particular connection.voidHighly risky!static voidStop managing a location.static voidreset()Stop managing all locations.
-
Method Details
-
isValid
public boolean isValid() -
haveUsedInTransaction
public boolean haveUsedInTransaction() -
getLocation
-
getTransMgrState
Return a description of the transaction manager state -
begin
Begin a transaction. Terminate a write transaction withTransaction.commit()orTransaction.abort(). Terminate a write transaction withTransaction.close(). -
begin
Begin a transaction, giving it a label. Terminate a write transaction withTransaction.commit()orTransaction.abort(). Terminate a write transaction withTransaction.close(). -
getBaseDataset
Internal operation - to get a dataset for application use, call aTDB1Factoryfunction. Do not use the base dataset without knowing how the transaction system uses it. -
getTransactionManager
For internal use only -
flush
public void flush()Flush the delayed write queue to the base storage. This can only be done if there are no active transactions. If there are active transactions, nothing is done but this is safe to call. -
activeTransactions
public boolean activeTransactions()Indicate whether there are any active transactions.- See Also:
-
forceRecoverFromJournal
public void forceRecoverFromJournal()Flush the journal regardless - use with great case - do not use when transactions may be active. -
printJournal
public void printJournal()Highly risky! -
make
Obtain a StoreConnection for a particular location -
reset
public static void reset()Stop managing all locations. Use with great care. Use viaTDBInternal.expel(org.apache.jena.sparql.core.DatasetGraph)wherever possible. -
release
Stop managing a location. There should be no transactions running. Use viaTDBInternal.expel(org.apache.jena.sparql.core.DatasetGraph)wherever possible. -
expel
Stop managing a location. Use with great care (testing only). Use viaTDBInternal.expel(org.apache.jena.sparql.core.DatasetGraph)wherever possible. -
make
Return a StoreConnection for a particular connection. This is used to create transactions for the database at the location. -
make
Make a StoreConnection based on any StoreParams at the location or the system defaults. -
getExisting
Return the StoreConnection if one already exists for this location, else return null -
createMemUncached
Return a StoreConnection backed by in-memory datastructures (for testing).
-