Class Indexers

java.lang.Object
de.otto.synapse.messagestore.Indexers

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

    • 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 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 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
    • partitionKeyIndexer

      public static Indexer partitionKeyIndexer()
      Returns an Indexer that is indexing TextMessage by Key.partitionKey().
      Returns:
      partition-key indexer
    • journalKeyIndexer

      public static Indexer journalKeyIndexer()
    • channelNameIndexer

      public static Indexer channelNameIndexer()
      Returns an Indexer that is indexing TextMessage by Key.partitionKey().
      Returns:
      partition-key indexer