Search in sources :

Example 31 with DatasetGraphTDB

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

the class TDBInternal method expel.

/**
 * Stop managing a DatasetGraph. Use with great care.
 */
public static synchronized void expel(DatasetGraph dsg, boolean force) {
    Location locContainer = null;
    Location locStorage = null;
    if (dsg instanceof DatasetGraphSwitchable) {
        locContainer = ((DatasetGraphSwitchable) dsg).getLocation();
        dsg = ((DatasetGraphSwitchable) dsg).getWrapped();
    }
    if (dsg instanceof DatasetGraphTDB)
        locStorage = ((DatasetGraphTDB) dsg).getLocation();
    DatabaseConnection.internalExpel(locContainer, force);
    StoreConnection.internalExpel(locStorage, force);
}
Also used : DatasetGraphSwitchable(org.apache.jena.tdb2.store.DatasetGraphSwitchable) Location(org.apache.jena.dboe.base.file.Location) DatasetGraphTDB(org.apache.jena.tdb2.store.DatasetGraphTDB)

Example 32 with DatasetGraphTDB

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

the class TDBInternal method expel.

/**
 * Stop managing a DatasetGraph. Use with great care.
 */
public static synchronized void expel(DatasetGraph dsg) {
    Location locContainer = null;
    Location locStorage = null;
    if (dsg instanceof DatasetGraphSwitchable) {
        locContainer = ((DatasetGraphSwitchable) dsg).getLocation();
        dsg = ((DatasetGraphSwitchable) dsg).getWrapped();
    }
    if (dsg instanceof DatasetGraphTDB)
        locStorage = ((DatasetGraphTDB) dsg).getLocation();
    if (locContainer != null)
        DatabaseConnection.internalExpel(locContainer, false);
    StoreConnection.internalExpel(locStorage, false);
}
Also used : DatasetGraphSwitchable(org.apache.jena.tdb2.store.DatasetGraphSwitchable) Location(org.apache.jena.dboe.base.file.Location) DatasetGraphTDB(org.apache.jena.tdb2.store.DatasetGraphTDB)

Aggregations

DatasetGraphTDB (org.apache.jena.tdb2.store.DatasetGraphTDB)19 Location (org.apache.jena.dboe.base.file.Location)10 Node (org.apache.jena.graph.Node)8 DatasetGraph (org.apache.jena.sparql.core.DatasetGraph)8 DatasetGraphSwitchable (org.apache.jena.tdb2.store.DatasetGraphSwitchable)8 Test (org.junit.Test)8 NodeId (org.apache.jena.tdb2.store.NodeId)7 NodeTable (org.apache.jena.tdb2.store.nodetable.NodeTable)7 Tuple (org.apache.jena.atlas.lib.tuple.Tuple)6 StoreConnection (org.apache.jena.tdb2.sys.StoreConnection)4 ConfigTest (org.apache.jena.tdb2.ConfigTest)3 TDBException (org.apache.jena.tdb2.TDBException)3 BufferChannel (org.apache.jena.dboe.base.file.BufferChannel)2 FileSet (org.apache.jena.dboe.base.file.FileSet)2 Record (org.apache.jena.dboe.base.record.Record)2 RecordFactory (org.apache.jena.dboe.base.record.RecordFactory)2 BPlusTree (org.apache.jena.dboe.trans.bplustree.BPlusTree)2 Graph (org.apache.jena.graph.Graph)2 NodeTupleTable (org.apache.jena.tdb2.store.nodetupletable.NodeTupleTable)2 ModDataset (arq.cmdline.ModDataset)1