java.lang.Object
org.apache.jena.graph.impl.GraphBase
org.apache.jena.mem.GraphMemBase
org.apache.jena.mem2.GraphMem2
org.apache.jena.mem2.GraphMem2Fast
- All Implemented Interfaces:
Graph
,GraphWithPerform
A graph that stores triples in memory. This class is not thread-safe.
Purpose: GraphMem2Fast is a strong candidate for becoming the new default in-memory graph in the upcoming Jena 5, thanks to its improved performance and relatively minor increase in memory usage.
Faster than GraphMem2Legacy
(specially Graph#add, Graph#find and Graph#stream)
Removing triples is a bit slower than GraphMem2Legacy
.
Memory consumption is about 6-35% higher than GraphMem2Legacy
Maps and sets are based on FastHashBase
Benefits from multiple small optimizations. (see: FastTripleStore
)
The heritage of GraphMem: - Also uses 3 hash-maps indexed by subjects, predicates, and objects - Values of the maps also switch from arrays to hash sets for the triples
-
Field Summary
Fields inherited from class org.apache.jena.graph.impl.GraphBase
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMIT
Fields inherited from interface org.apache.jena.graph.Graph
emptyGraph
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.jena.mem2.GraphMem2
clear, destroy, getCapabilities, graphBaseContains, graphBaseFind, graphBaseSize, performAdd, performDelete, stream, stream
Methods inherited from class org.apache.jena.mem.GraphMemBase
close, openAgain
Methods inherited from class org.apache.jena.graph.impl.GraphBase
add, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getEventManager, getPrefixMapping, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, remove, size, toString, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.jena.graph.Graph
add, add, close, contains, contains, delete, delete, dependsOn, find, find, find, getEventManager, getPrefixMapping, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, remove, size
-
Constructor Details
-
GraphMem2Fast
public GraphMem2Fast()
-