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, 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)
Look up a set of keys from the storage.java.util.stream.Stream<M>
stream(Q query)
Run a query and stream the resulting items.-
Methods inherited from interface net.morimekta.providence.storage.MessageSearcher
searchBuilders
-
-
-
-
Constructor Detail
-
PredicateFilterMessageStoreSearcher
public PredicateFilterMessageStoreSearcher(MessageReadOnlyStore<K,M,F> store, PredicateFilterMessageStoreSearcher.PredicateFilter<Q,K,M,F> predicate)
-
-
Method Detail
-
search
@Nonnull public java.util.List<M> search(@Nonnull Q query)
Description copied from interface:MessageSearcher
Look up a set of keys from the storage.
-
-