Package de.otto.synapse.messagestore
Class CalculatedValueIndexer
- java.lang.Object
-
- de.otto.synapse.messagestore.CalculatedValueIndexer
-
-
Constructor Summary
Constructors Constructor Description CalculatedValueIndexer(Index index, java.util.function.Function<MessageStoreEntry,java.lang.String> calculator)Creates aCalculatedValueIndexer.
-
Method Summary
Modifier and Type Method Description java.lang.Stringcalc(Index index, MessageStoreEntry entry)Calculates the Index value from the message-store entry.com.google.common.collect.ImmutableSet<Index>getIndexes()Returns the indexes supported by this Indexer.MessageStoreEntryindex(MessageStoreEntry entry)booleansupports(Index index)
-
-
-
Constructor Detail
-
CalculatedValueIndexer
public CalculatedValueIndexer(@Nonnull Index index, @Nonnull java.util.function.Function<MessageStoreEntry,java.lang.String> calculator)Creates aCalculatedValueIndexer.- Parameters:
index- theIndexthat is calculated by thecalculatorfunctioncalculator- the function that is used to calculate the value for the index
-
-
Method Detail
-
getIndexes
@Nonnull public com.google.common.collect.ImmutableSet<Index> getIndexes()
Description copied from interface:IndexerReturns the indexes supported by this Indexer.- Specified by:
getIndexesin interfaceIndexer- Returns:
- Set of Index instances
-
supports
public boolean supports(@Nonnull Index index)
-
calc
public java.lang.String calc(@Nonnull Index index, @Nonnull MessageStoreEntry entry)Description copied from interface:IndexerCalculates the Index value from the message-store entry.
-
index
@Nonnull public MessageStoreEntry index(@Nonnull MessageStoreEntry entry)
-
-