java.lang.Object
org.apache.jena.graph.impl.GraphBase
org.apache.jena.mem.GraphMem
org.apache.jena.mem.GraphMemLegacy
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Copyable<GraphMem>,Graph,GraphWithPerform
A graph that stores triples in memory. This class is not thread-safe.
Purpose: Use this graph implementation if you want to maintain the 'old' behavior of GraphMem or if your memory constraints prevent you from utilizing more memory-intensive solutions.
Slightly improved performance compared to GraphMemValue
Simplified implementation, primarily due to lack of support for Iterator#remove
The heritage of GraphMem:
- Same basic structure
- Same memory consumption
- Also based on HashCommon
This implementation is based on the original GraphMemValue implementation.
The main difference is that it strictly uses term equality for all nodes.
The inner workings of the used structures like ArrayBunch and HashedBunchMap are not changed.
-
Field Summary
Fields inherited from class org.apache.jena.graph.impl.GraphBase
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMITFields inherited from interface org.apache.jena.graph.Graph
emptyGraph -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.jena.mem.GraphMem
clear, graphBaseContains, graphBaseFind, graphBaseSize, performAdd, performDelete, stream, streamMethods inherited from class org.apache.jena.graph.impl.GraphBase
add, close, contains, contains, delete, find, find, forTestingOnly_graphBaseFind, getEventManager, getPrefixMapping, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, remove, size, toString, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.jena.graph.Graph
add, add, close, contains, contains, delete, delete, find, find, find, getEventManager, getPrefixMapping, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, remove, size, sizeLong
-
Constructor Details
-
GraphMemLegacy
public GraphMemLegacy()
-
-
Method Details
-
copy
Description copied from class:GraphMemCreates a copy of this graph. Since the triples and nodes are immutable, the copy contains the same triples and nodes as this graph. Modifications to the copy will not affect this graph.
-