public class IncomingMessageEnvelope
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
END_OF_STREAM_OFFSET |
Constructor and Description |
---|
IncomingMessageEnvelope(SystemStreamPartition systemStreamPartition,
java.lang.String offset,
java.lang.Object key,
java.lang.Object message)
Constructs a new IncomingMessageEnvelope from specified components.
|
IncomingMessageEnvelope(SystemStreamPartition systemStreamPartition,
java.lang.String offset,
java.lang.Object key,
java.lang.Object message,
int size)
Constructs a new IncomingMessageEnvelope from specified components.
|
Modifier and Type | Method and Description |
---|---|
static IncomingMessageEnvelope |
buildEndOfStreamEnvelope(SystemStreamPartition ssp)
Builds an end-of-stream envelope for an SSP.
|
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
getKey() |
java.lang.Object |
getMessage() |
java.lang.String |
getOffset() |
int |
getSize() |
SystemStreamPartition |
getSystemStreamPartition() |
int |
hashCode() |
boolean |
isEndOfStream() |
java.lang.String |
toString() |
public IncomingMessageEnvelope(SystemStreamPartition systemStreamPartition, java.lang.String offset, java.lang.Object key, java.lang.Object message)
systemStreamPartition
- The aggregate object representing the incoming stream name, the name of the cluster
from which the stream came, and the partition of the stream from which the message was received.offset
- The offset in the partition that the message was received from.key
- A deserialized key received from the partition offset.message
- A deserialized message received from the partition offset.public IncomingMessageEnvelope(SystemStreamPartition systemStreamPartition, java.lang.String offset, java.lang.Object key, java.lang.Object message, int size)
systemStreamPartition
- The aggregate object representing the incoming stream name, the name of the cluster
from which the stream came, and the partition of the stream from which the message was received.offset
- The offset in the partition that the message was received from.key
- A deserialized key received from the partition offset.message
- A deserialized message received from the partition offset.size
- size of the message and key in bytes.public SystemStreamPartition getSystemStreamPartition()
public java.lang.String getOffset()
public java.lang.Object getKey()
public java.lang.Object getMessage()
public int getSize()
public boolean isEndOfStream()
public static IncomingMessageEnvelope buildEndOfStreamEnvelope(SystemStreamPartition ssp)
SystemConsumer
implementation to
indicate that it is at end-of-stream. The end-of-stream message should not delivered to the task implementation.ssp
- The SSP that is at end-of-stream.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object