Class Indexers


  • @Beta
    public class Indexers
    extends java.lang.Object
    Utility class used to create Indexer instances.
    • Method Detail

      • noOpIndexer

        public static Indexer noOpIndexer()
        Returns:
        no-op Indexer that is not doing anything.
      • composite

        public static Indexer composite​(com.google.common.collect.ImmutableList<Indexer> indexers)
        Returns a composite Indexer that is able to support several indexes.
        Parameters:
        indexers - the list of Indexers
        Returns:
        composite Indexer
      • composite

        public static Indexer composite​(Indexer... indexers)
        Returns a composite Indexer that is able to support several indexes.
        Parameters:
        indexers - the list of Indexers
        Returns:
        composite Indexer
      • originIndexer

        public static Indexer originIndexer​(@Nonnull
                                            java.lang.String origin)
        Returns an Indexer that is indexing all entries with static value that is identifying the origin of some message.

        The origin can be the name of the service sending the message, or some other identifier like, for example 'Snapshot'.

        Parameters:
        origin - the origin of the indexed message
        Returns:
        origin indexer
      • serviceInstanceIndexer

        public static Indexer serviceInstanceIndexer​(@Nonnull
                                                     java.lang.String serviceInstance)
        Returns an Indexer that is indexing all entries with static value that is identifying the service-instance that has added the message to the MessageStore.

        In most cases, a hostname:port or service-name@hostname:port value is sufficient to identify the instance of some service

        Parameters:
        serviceInstance - a string identifying a single instance of a cluster.
        Returns:
        serviceInstance indexer
      • journalKeyIndexer

        public static Indexer journalKeyIndexer()