Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.hp.hpl.jena.mem
Class GraphMemBase  view GraphMemBase download GraphMemBase.java

java.lang.Object
  extended bycom.hp.hpl.jena.graph.impl.GraphBase
      extended bycom.hp.hpl.jena.mem.GraphMemBase
All Implemented Interfaces:
com.hp.hpl.jena.graph.Graph, com.hp.hpl.jena.graph.GraphAdd, com.hp.hpl.jena.graph.impl.GraphWithPerform
Direct Known Subclasses:
GraphMem, MixedGraphMem, SmallGraphMem

public abstract class GraphMemBase
extends com.hp.hpl.jena.graph.impl.GraphBase

GraphMemBase - a common base class for GraphMem and SmallGraphMem. Any GraphMemBase 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 decrememented, 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.


Field Summary
protected  int count
          The number-of-times-opened count.
 
Fields inherited from class com.hp.hpl.jena.graph.impl.GraphBase
bulkHandler, capabilities, closed, gem, pm, queryHandler, reifier, style
 
Fields inherited from interface com.hp.hpl.jena.graph.Graph
emptyGraph
 
Constructor Summary
GraphMemBase(com.hp.hpl.jena.shared.ReificationStyle style)
          initialise a GraphMemBase withn its count set to 1.
 
Method Summary
 void close()
          Close this graph; if it is now fully closed, destroy its resources and run the GraphBase close.
protected abstract  void destroy()
          Sub-classes over-ride this method to release any resources they no longer need once fully closed.
 GraphMemBase openAgain()
          Note a re-opening of this graph by incrementing the count.
 
Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
add, checkOpen, contains, contains, containsByFind, delete, dependsOn, find, find, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getTransactionHandler, graphBaseContains, graphBaseFind, graphBaseFind, graphBaseSize, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, performAdd, performDelete, queryHandler, reifierContains, reifierSize, reifierTriples, size, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

count

protected int count
The number-of-times-opened count.

Constructor Detail

GraphMemBase

public GraphMemBase(com.hp.hpl.jena.shared.ReificationStyle style)
initialise a GraphMemBase withn its count set to 1.

Method Detail

openAgain

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


destroy

protected abstract 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.