Package org.graylog2.indexer.messages
Interface Indexable
- All Known Subinterfaces:
Event,ImmutableMessage
- All Known Implementing Classes:
EventImpl,Message,SerializationMemoizingMessage
public interface Indexable
-
Method Summary
Modifier and TypeMethodDescriptiongetId()Deprecated.Returns the id to address the document in Elasticsearch.org.joda.time.DateTimelonggetSize()org.joda.time.DateTimedefault byte[]serialize(SerializationContext context) Serializes the object to a form that can be sent to the indexer, e.g.default booleanGuides the failure handling framework when deciding whether this particular message should be accepted for the further failure processing.toElasticSearchObject(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.codahale.metrics.Meter invalidTimestampMeter)
-
Method Details
-
getId
Deprecated.Returns the id to address the document in Elasticsearch. Depending on the implementation this might return aUUIDorULIDThis method should only be used where backwards compatibility is needed. Newer code should usegetMessageId()instead. -
getMessageId
String getMessageId()Returns the id to address the document in Elasticsearch. The message id is represented as aULID -
getSize
long getSize() -
getReceiveTime
org.joda.time.DateTime getReceiveTime() -
toElasticSearchObject
-
getTimestamp
org.joda.time.DateTime getTimestamp() -
serialize
Serializes the object to a form that can be sent to the indexer, e.g. JSON.The default implementation will just call
toElasticSearchObject(ObjectMapper, Meter)- Parameters:
context- Context required to perform the serialization- Returns:
- an array of bytes that can be sent to the indexer
- Throws:
IOException- if serializing the object fails
-
supportsFailureHandling
default boolean supportsFailureHandling()Guides the failure handling framework when deciding whether this particular message should be accepted for the further failure processing. By default disabled for all messages.
-