Class GraphMem2Legacy

All Implemented Interfaces:
org.apache.jena.atlas.lib.Copyable<GraphMem2>, Graph, GraphWithPerform

public class GraphMem2Legacy extends GraphMem2
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 GraphMem 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 GraphMem 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.

  • Constructor Details

    • GraphMem2Legacy

      public GraphMem2Legacy()
  • Method Details

    • copy

      public GraphMem2Legacy copy()
      Description copied from class: GraphMem2
      Creates 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.
      Specified by:
      copy in interface org.apache.jena.atlas.lib.Copyable<GraphMem2>
      copy in class GraphMem2
      independent copy of the current graph