Github user kinow commented on a diff in the pull request:
https://github.com/apache/jena/pull/459#discussion_r209424635
--- Diff:
jena-db/jena-tdb2/src/main/java/org/apache/jena/tdb2/sys/TDBInternal.java ---
@@ -176,6 +176,23 @@ public static synchronized void expel(DatasetGraph
dsg) {
StoreConnection.internalExpel(locStorage, false);
}
+ /** 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();
+
--- End diff --
Makes sense! Thanks for quickly checking. Everything looks good, LGTM :+1:
---