Module org.apache.jena.core
Class ManualStoreStrategy
java.lang.Object
org.apache.jena.mem.store.roaring.strategies.ManualStoreStrategy
- All Implemented Interfaces:
StoreStrategy
A manual store strategy that does not maintain an index.
This strategy is used when no indexing is required, and all operations are no-ops.
It throws an exception if any match operation is attempted before the index is initialized.
-
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
-
ManualStoreStrategy
public ManualStoreStrategy()
-
-
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
-