Package de.otto.synapse.messagestore
Class Indexers
java.lang.Object
de.otto.synapse.messagestore.Indexers
@Beta
public class Indexers
extends java.lang.Object
Utility class used to create
Indexer instances.-
Method Summary
Modifier and Type Method Description static IndexerchannelNameIndexer()Returns an Indexer that is indexingTextMessagebyKey.partitionKey().static Indexercomposite(com.google.common.collect.ImmutableList<Indexer> indexers)Returns a composite Indexer that is able to support several indexes.static Indexercomposite(Indexer... indexers)Returns a composite Indexer that is able to support several indexes.static IndexerjournalKeyIndexer()static IndexernoOpIndexer()static IndexeroriginIndexer(java.lang.String origin)Returns an Indexer that is indexing all entries with static value that is identifying the origin of some message.static IndexerpartitionKeyIndexer()Returns an Indexer that is indexingTextMessagebyKey.partitionKey().static IndexerserviceInstanceIndexer(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 theMessageStore.
-
Method Details
-
noOpIndexer
- Returns:
- no-op Indexer that is not doing anything.
-
composite
Returns a composite Indexer that is able to support several indexes.- Parameters:
indexers- the list of Indexers- Returns:
- composite Indexer
-
composite
Returns a composite Indexer that is able to support several indexes.- Parameters:
indexers- the list of Indexers- Returns:
- composite Indexer
-
originIndexer
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
Returns an Indexer that is indexing all entries with static value that is identifying the service-instance that has added the message to theMessageStore.In most cases, a
hostname:portorservice-name@hostname:portvalue is sufficient to identify the instance of some service- Parameters:
serviceInstance- a string identifying a single instance of a cluster.- Returns:
- serviceInstance indexer
-
partitionKeyIndexer
Returns an Indexer that is indexingTextMessagebyKey.partitionKey().- Returns:
- partition-key indexer
-
journalKeyIndexer
-
channelNameIndexer
Returns an Indexer that is indexingTextMessagebyKey.partitionKey().- Returns:
- partition-key indexer
-