Search in sources :

Example 16 with DatasetGraphSwitchable

use of org.apache.jena.tdb2.store.DatasetGraphSwitchable in project jena by apache.

the class DatabaseMgr method compact.

/**
 * Compact a datasets 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 `shouldDeleteOld` is `true`.
 *
 * @param container
 * @param shouldDeleteOld
 */
public static void compact(DatasetGraph container, boolean shouldDeleteOld) {
    DatasetGraphSwitchable dsg = requireSwitchable(container);
    DatabaseOps.compact(dsg, shouldDeleteOld);
}
Also used : DatasetGraphSwitchable(org.apache.jena.tdb2.store.DatasetGraphSwitchable)

Aggregations

DatasetGraphSwitchable (org.apache.jena.tdb2.store.DatasetGraphSwitchable)14 DatasetGraphTDB (org.apache.jena.tdb2.store.DatasetGraphTDB)10 Location (org.apache.jena.dboe.base.file.Location)8 DatasetGraph (org.apache.jena.sparql.core.DatasetGraph)6 Graph (org.apache.jena.graph.Graph)4 ConfigTest (org.apache.jena.tdb2.ConfigTest)4 Test (org.junit.Test)4 TDBException (org.apache.jena.tdb2.TDBException)3 AssemblerException (org.apache.jena.assembler.exceptions.AssemblerException)2 Model (org.apache.jena.rdf.model.Model)2 GraphViewSwitchable (org.apache.jena.tdb2.store.GraphViewSwitchable)2 ModDataset (arq.cmdline.ModDataset)1 RuntimeIOException (org.apache.jena.atlas.RuntimeIOException)1 CmdException (org.apache.jena.cmd.CmdException)1 TransactionCoordinator (org.apache.jena.dboe.transaction.txn.TransactionCoordinator)1 TransactionalSystem (org.apache.jena.dboe.transaction.txn.TransactionalSystem)1 Dataset (org.apache.jena.query.Dataset)1 JenaException (org.apache.jena.shared.JenaException)1