Class GraphMemFast

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

public class GraphMemFast extends GraphMem
A graph that stores triples in memory. This class is not thread-safe.

Compared to GraphMemLegacy:

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
  • Constructor Details

    • GraphMemFast

      public GraphMemFast()
  • Method Details

    • copy

      public GraphMemFast copy()
      Description copied from class: GraphMem
      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<GraphMem>
      Overrides:
      copy in class GraphMem
      Returns:
      independent copy of the current graph