On 15/03/16 10:30, Dick Murray wrote:
Sorry, supportsTransactionAbort() in AFS-Dev
<https://github.com/afs/AFS-Dev>/src
<https://github.com/afs/AFS-Dev/tree/master/src>/main
<https://github.com/afs/AFS-Dev/tree/master/src/main>/java
<https://github.com/afs/AFS-Dev/tree/master/src/main/java>/projects
<https://github.com/afs/AFS-Dev/tree/master/src/main/java/projects>/dsg2
<https://github.com/afs/AFS-Dev/tree/master/src/main/java/projects/dsg2>/
*DatasetGraphStorage.java*

*Experimental code.*



supportsTransactionAbort is in the DatasetGraph interface in Jena.


DatasetGraphStorage is using TransactionalLock.createMRSW

As mentioned, it needs cooperation from the underlying thing to be able to do aborts and MRSW does not provide that (it's external locking).

DatasetGraphStorage doesn't presume that the storage unit is transactional.

After these discussions I've decided to create a DatasetGraphOnDemand which
extends DatasetGraphMap and uses Union graphs.

However in DatasetGraphMap shouldn't getGraphCreate() be
getGraphCreate(Node graphNode) as otherwise it doesn't know what to create?

It creates a graph - addGraph(graphNode, g) is managing the naming. Grapsh don't know the name used (in other places one graph can have many names).

DatasetGraphMap is for a collection of independent graphs to be turned into a dataset.

        Andy

     @Override
     public Graph getGraph(Node graphNode)
     {
         Graph g = graphs.get(graphNode) ;
         if ( g == null )
         {
             g = getGraphCreate() ;
             if ( g != null )
                 addGraph(graphNode, g) ;
         }
         return g ;
     }

     /** Called from getGraph when a nonexistent graph is asked for.
      * Return null for "nothing created as a graph"
      */
     protected Graph getGraphCreate() { return null ; }

Dick.


Reply via email to