- All Implemented Interfaces:
Serializable,Comparable<IndexingStrategy>,Constable
Indexing strategies supported by
IndexedSetTripleStore
and RoaringTripleStore.
The indexing strategy determines how (and when) the auxiliary
subject/predicate/object index is maintained for pattern-matching operations.
The graph always keeps a flat set of triples. Operations that do not involve pattern matching (size, iterating all triples, lookup of a fully concrete triple, etc.) are evaluated directly against this set and are unaffected by the indexing strategy.
Pattern matching refers to Graph.find(org.apache.jena.graph.Triple), Graph.remove(org.apache.jena.graph.Node, org.apache.jena.graph.Node, org.apache.jena.graph.Node) or
Graph.contains(org.apache.jena.graph.Node, org.apache.jena.graph.Node, org.apache.jena.graph.Node) called with a triple pattern such as
S__, SP_, S_O, _P_, _PO or
__O (where _ denotes a wildcard).
Lookups for fully concrete triples (SPO) are always answered
directly from the triple set and never use the index.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe index is always present.The index is built on demand the first time a pattern match is requested.LikeLAZY, but the on-demand index build uses parallel processing for faster initialization on large graphs.The index is never built automatically.No index is built. -
Method Summary
Modifier and TypeMethodDescriptionstatic IndexingStrategyReturns the enum constant of this class with the specified name.static IndexingStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
EAGER
The index is always present.Graph.add(org.apache.jena.graph.Triple),Graph.delete(org.apache.jena.graph.Triple)andGraph.clear()update the index immediately. CallingclearIndexsimply discards the existing index, which is then rebuilt from the triple set. -
LAZY
The index is built on demand the first time a pattern match is requested. Once built, behaves likeEAGER. CallingclearIndexdiscards the index; it will be rebuilt on demand the next time a pattern match is performed. -
LAZY_PARALLEL
LikeLAZY, but the on-demand index build uses parallel processing for faster initialization on large graphs. -
MANUAL
The index is never built automatically. Pattern-match operations throw anUnsupportedOperationExceptionuntil the index is initialized explicitly (e.g. viaGraphMemIndexedSet.initializeIndex()). After initialization, behaves likeEAGER. -
MINIMAL
No index is built. Pattern-match operations are evaluated by linearly filtering the triple set, which is space-efficient but slower for large graphs. The index can be initialized explicitly to switch to eager behavior; callingclearIndexreverts to filtering again.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-