Module org.apache.jena.core
Class MinimalStoreStrategy
java.lang.Object
org.apache.jena.mem.store.roaring.strategies.MinimalStoreStrategy
- All Implemented Interfaces:
StoreStrategy
A minimal store strategy that does not maintain any bitmaps or indexes.
This strategy is used when no indexing is required.
The matching operations are performed directly on the set of triples.
This strategy is useful for scenarios where the overhead of maintaining an index is not justified,
such as when the dataset is small or when the performance of match operations is not critical.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToIndex(Triple triple, int index) Add a triple to the index if the cuurent strategy supports indexing.voidClear the index of this store if the current strategy supports indexing.booleancontainsMatch(Triple tripleMatch, MatchPattern pattern) Check if the index contains a match for the given triple and pattern.findMatch(Triple tripleMatch, MatchPattern pattern) Find the triples that match the given triple and pattern.voidremoveFromIndex(Triple triple, int index) Remove a triple from the index if the current strategy supports indexing.streamMatch(Triple tripleMatch, MatchPattern pattern) Stream the triples that match the given triple and pattern.
-
Constructor Details
-
MinimalStoreStrategy
-
-
Method Details
-
addToIndex
Description copied from interface:StoreStrategyAdd a triple to the index if the cuurent strategy supports indexing.- Specified by:
addToIndexin interfaceStoreStrategy- Parameters:
triple- the triple to addindex- the index of the triple in the store
-
removeFromIndex
Description copied from interface:StoreStrategyRemove a triple from the index if the current strategy supports indexing.- Specified by:
removeFromIndexin interfaceStoreStrategy- Parameters:
triple- the triple to removeindex- the index of the triple in the store
-
clearIndex
public void clearIndex()Description copied from interface:StoreStrategyClear the index of this store if the current strategy supports indexing. This will remove all triples from the index.- Specified by:
clearIndexin interfaceStoreStrategy
-
containsMatch
Description copied from interface:StoreStrategyCheck if the index contains a match for the given triple and pattern. This is used to quickly check if a triple matches a given pattern without retrieving the triples.- Specified by:
containsMatchin interfaceStoreStrategy- Parameters:
tripleMatch- the triple to matchpattern- the pattern to match against- Returns:
- true if there is a match, false otherwise
-
streamMatch
Description copied from interface:StoreStrategyStream the triples that match the given triple and pattern. This is used to retrieve the triples that match a given pattern.- Specified by:
streamMatchin interfaceStoreStrategy- Parameters:
tripleMatch- the triple to matchpattern- the pattern to match against- Returns:
- a stream of triples that match the given pattern
-
findMatch
Description copied from interface:StoreStrategyFind the triples that match the given triple and pattern. This is used to retrieve the triples that match a given pattern as an iterator.- Specified by:
findMatchin interfaceStoreStrategy- Parameters:
tripleMatch- the triple to matchpattern- the pattern to match against- Returns:
- an iterator over the triples that match the given pattern
-