java.lang.Object
org.apache.jena.tdb2.DatabaseMgr
Operations for TDBS DatasetGraph, including admin operations
See
TDB2Factory for creating API-level Datasets.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringbackup(DatasetGraph container) Create a backup for a switchable TDB database.static voidcompact(DatasetGraph container) Compact a dataset which must be a switchable TDB database.static voidcompact(DatasetGraph container, boolean shouldDeleteOld) Compact a dataset which must be a switchable TDB database.static DatasetGraphconnectDatasetGraph(String location) Create or connect to a TDB2-backed datasetstatic DatasetGraphconnectDatasetGraph(org.apache.jena.dboe.base.file.Location location) Create or connect to a TDB2-backed datasetstatic DatasetGraphCreate an in-memory TDB2-backed dataset (for testing)static booleanisTDB2(DatasetGraph datasetGraph) Return whether aDatasetGraphis a TDB2 database.static org.apache.jena.dboe.base.file.Locationlocation(DatasetGraph datasetGraph) Return the location of a DatasetGraph if it is backed by TDB, else null.
-
Method Details
-
connectDatasetGraph
Create or connect to a TDB2-backed dataset -
connectDatasetGraph
Create or connect to a TDB2-backed dataset -
compact
Compact a dataset which must be a switchable TDB database. This is the normal dataset type for on-disk TDB2 databases.Deletes old database after successful compaction if
shouldDeleteOldistrue.This is equivalent to a call of
compact(container, false)(do not delete old database).- Parameters:
container- Thiscompact(container, false)instead.
-
compact
Compact a dataset which must be a switchable TDB database. This is the normal dataset type for on-disk TDB2 databases. Deletes old database after successful compaction ifshouldDeleteOldistrue.- Parameters:
container-shouldDeleteOld-
-
backup
Create a backup for a switchable TDB database. This is the normal dataset type for on-disk TDB2 databases.The backup is created in the databases folder, under "Backups".
Backup creates a consistent copy og the database. It is performed as a read-transaction and does not lock out other use of the dataset.
- Parameters:
container-- Returns:
- File name of the backup.
-
createDatasetGraph
Create an in-memory TDB2-backed dataset (for testing) -
isTDB2
Return whether aDatasetGraphis a TDB2 database. -
location
Return the location of a DatasetGraph if it is backed by TDB, else null.
-