Class GraphRefCount

java.lang.Object
org.apache.jena.graph.impl.WrappedGraph
org.apache.jena.ontology.models.GraphRefCount
All Implemented Interfaces:
Graph, GraphWithPerform

public class GraphRefCount extends WrappedGraph
GraphMemRefCount - a base class for GraphMemValue

GraphMemRefCount maintains a reference count, set to one when it is created, and incremented by the method openAgain(). When the graph is closed, the count is decremented, and when it reaches 0, the tables are trashed and GraphBase.close() called. Thus in normal use one close is enough, but GraphMakers using GraphMems can arrange to re-use the same named graph.

  • Method Details

    • openAgain

      public GraphRefCount openAgain()
      Note a re-opening of this graph by incrementing the count. Answer this Graph.
    • destroy

      public void destroy()
      Sub-classes over-ride this method to release any resources they no longer need once fully closed.
    • close

      public void close()
      Close this graph; if it is now fully closed, destroy its resources and run the GraphBase close.
      Specified by:
      close in interface Graph
      Overrides:
      close in class WrappedGraph