Package net.morimekta.providence.storage
Class PredicateFilterMessageStoreSearcher<Q,K,M extends net.morimekta.providence.PMessage<M,F>,F extends net.morimekta.providence.descriptor.PField>
- java.lang.Object
-
- net.morimekta.providence.storage.PredicateFilterMessageStoreSearcher<Q,K,M,F>
-
- Type Parameters:
M- The message type in the store.F- The message field type.
- All Implemented Interfaces:
MessageSearcher<Q,M,F>,Searcher<Q,M>
public class PredicateFilterMessageStoreSearcher<Q,K,M extends net.morimekta.providence.PMessage<M,F>,F extends net.morimekta.providence.descriptor.PField> extends java.lang.Object implements MessageSearcher<Q,M,F>
Simple store searcher that finds all messages in a given store that matches a simple java predicate. Note that this will always load all the data from the store in order to do the search.
-
-
Constructor Summary
Constructors Constructor Description PredicateFilterMessageStoreSearcher(MessageReadOnlyStore<K,M,F> store, java.util.function.BiPredicate<M,Q> biPredicate)PredicateFilterMessageStoreSearcher(MessageReadOnlyStore<K,M,F> store, PredicateFilterMessageStoreSearcher.PredicateFilter<Q,K,M,F> predicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<M>search(Q query)Run a query and return the resulting items.java.util.stream.Stream<M>stream(Q query)Run a query and stream the resulting items.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.morimekta.providence.storage.MessageSearcher
searchBuilders
-
-
-
-
Constructor Detail
-
PredicateFilterMessageStoreSearcher
public PredicateFilterMessageStoreSearcher(MessageReadOnlyStore<K,M,F> store, java.util.function.BiPredicate<M,Q> biPredicate)
-
PredicateFilterMessageStoreSearcher
public PredicateFilterMessageStoreSearcher(MessageReadOnlyStore<K,M,F> store, PredicateFilterMessageStoreSearcher.PredicateFilter<Q,K,M,F> predicate)
-
-