Class ManualStoreStrategy

java.lang.Object
org.apache.jena.mem.store.roaring.strategies.ManualStoreStrategy
All Implemented Interfaces:
StoreStrategy

public class ManualStoreStrategy extends Object implements 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 Details

    • ManualStoreStrategy

      public ManualStoreStrategy()
  • Method Details

    • addToIndex

      public void addToIndex(Triple triple, int index)
      Description copied from interface: StoreStrategy
      Add a triple to the index if the cuurent strategy supports indexing.
      Specified by:
      addToIndex in interface StoreStrategy
      Parameters:
      triple - the triple to add
      index - the index of the triple in the store
    • removeFromIndex

      public void removeFromIndex(Triple triple, int index)
      Description copied from interface: StoreStrategy
      Remove a triple from the index if the current strategy supports indexing.
      Specified by:
      removeFromIndex in interface StoreStrategy
      Parameters:
      triple - the triple to remove
      index - the index of the triple in the store
    • clearIndex

      public void clearIndex()
      Description copied from interface: StoreStrategy
      Clear the index of this store if the current strategy supports indexing. This will remove all triples from the index.
      Specified by:
      clearIndex in interface StoreStrategy
    • containsMatch

      public boolean containsMatch(Triple tripleMatch, MatchPattern pattern)
      Description copied from interface: StoreStrategy
      Check 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:
      containsMatch in interface StoreStrategy
      Parameters:
      tripleMatch - the triple to match
      pattern - the pattern to match against
      Returns:
      true if there is a match, false otherwise
    • streamMatch

      public Stream<Triple> streamMatch(Triple tripleMatch, MatchPattern pattern)
      Description copied from interface: StoreStrategy
      Stream the triples that match the given triple and pattern. This is used to retrieve the triples that match a given pattern.
      Specified by:
      streamMatch in interface StoreStrategy
      Parameters:
      tripleMatch - the triple to match
      pattern - the pattern to match against
      Returns:
      a stream of triples that match the given pattern
    • findMatch

      public ExtendedIterator<Triple> findMatch(Triple tripleMatch, MatchPattern pattern)
      Description copied from interface: StoreStrategy
      Find 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:
      findMatch in interface StoreStrategy
      Parameters:
      tripleMatch - the triple to match
      pattern - the pattern to match against
      Returns:
      an iterator over the triples that match the given pattern