@Beta
public class Index
extends java.lang.Object
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.
| Modifier and Type | Field and Description |
|---|---|
static Index |
CHANNEL_NAME
Index that is used to access messages in a
MessageStore by MessageStoreEntry.getChannelName() |
static Index |
JOURNAL_KEY |
static Index |
ORIGIN
Index that is used to specify the origin of the
MessageStoreEntry. |
static Index |
PARTITION_KEY
Index that is used to access messages in a
MessageStore by Key.partitionKey()
The name of the index is 'partitionKey' |
static Index |
SERVICE_INSTANCE
Index that is used to specify the service instance that has added the
MessageStoreEntry to the
MessageStore. |
| Constructor and Description |
|---|
Index(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getName()
Returns the field name used to store the indexed value.
|
int |
hashCode() |
java.lang.String |
toString() |
static Index |
valueOf(java.lang.String name) |
public static final Index CHANNEL_NAME
MessageStore by MessageStoreEntry.getChannelName()public static final Index ORIGIN
MessageStoreEntry. Depending on the use-case, this
might be a simple hint like, for example, "origin" : "Snapshot", or the name of the originating
service.public static final Index SERVICE_INSTANCE
MessageStoreEntry to the
MessageStore. The value can be something like hostname:port or some other identfier
used to distinguish different instances of single service.public static final Index PARTITION_KEY
MessageStore by Key.partitionKey()
The name of the index is 'partitionKey'
public static final Index JOURNAL_KEY
public static Index valueOf(java.lang.String name)
@Nonnull public java.lang.String getName()
The name is used by MessageStore implementations to generate datastructures used
for the Index.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object