Class PredicateFilterMessageStoreSearcher<Q,​K,​M extends PMessage<M>>

  • Type Parameters:
    Q - The query type.
    K - The store's key type.
    M - The message type in the store.
    All Implemented Interfaces:
    MessageSearcher<Q,​M>, Searcher<Q,​M>

    public class PredicateFilterMessageStoreSearcher<Q,​K,​M extends PMessage<M>>
    extends java.lang.Object
    implements MessageSearcher<Q,​M>
    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.
    • Method Detail

      • search

        @Nonnull
        public java.util.List<M> search​(@Nonnull
                                        Q query)
        Description copied from interface: Searcher
        Run a query and return the resulting items.
        Specified by:
        search in interface Searcher<Q,​K>
        Parameters:
        query - The search query.
        Returns:
        List of all R that matches Query Q.
      • stream

        @Nonnull
        public java.util.stream.Stream<M> stream​(@Nonnull
                                                 Q query)
        Description copied from interface: Searcher
        Run a query and stream the resulting items.
        Specified by:
        stream in interface Searcher<Q,​K>
        Parameters:
        query - The search query.
        Returns:
        Stream of all R that matches Query Q.