Package de.otto.synapse.messagestore
Class Index
java.lang.Object
de.otto.synapse.messagestore.Index
Identifies a single Index used by a
MessageStore to index messages using some Indexer
Indexes could be used to access messages in the store that share some common properties. For example,
the partition-key index is used to retrieve all messages that
have the same partition key.
You can introduce your own index by 1. introduce an instance of Index and 2. implement an Indexer
that is supporting the new Index.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IndexIndex that is used to access messages in aMessageStorebyMessageStoreEntry.getChannelName()static final Indexstatic final IndexIndex that is used to specify the origin of theMessageStoreEntry.static final IndexIndex that is used to access messages in aMessageStorebyKey.partitionKey()static final IndexIndex that is used to specify the service instance that has added theMessageStoreEntryto theMessageStore. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CHANNEL_NAME
Index that is used to access messages in aMessageStorebyMessageStoreEntry.getChannelName() -
ORIGIN
Index that is used to specify the origin of theMessageStoreEntry. Depending on the use-case, this might be a simple hint like, for example,"origin" : "Snapshot", or the name of the originating service. -
SERVICE_INSTANCE
Index that is used to specify the service instance that has added theMessageStoreEntryto theMessageStore. The value can be something likehostname:portor some other identfier used to distinguish different instances of single service. -
PARTITION_KEY
Index that is used to access messages in aMessageStorebyKey.partitionKey()The
nameof the index is'partitionKey' -
JOURNAL_KEY
-
-
Constructor Details
-
Index
-
-
Method Details
-
valueOf
-
getName
Returns the field name used to store the indexed value.The
nameis used byMessageStoreimplementations to generate datastructures used for the Index.- Returns:
- field name
-
equals
-
hashCode
public int hashCode() -
toString
-