public class MessageId extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
RAW_ID_SIZE |
| Constructor and Description |
|---|
MessageId(byte[] rawId)
Creates a instance based on the given raw id bytes.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
short |
getPayloadSequenceId()
Returns the sequence id generated when the message was written to the Payload Table.
|
long |
getPayloadWriteTimestamp()
Returns the timestamp when the message was written to the Payload Table.
|
long |
getPublishTimestamp()
Returns the publish timestamp in milliseconds of the message.
|
byte[] |
getRawId()
Returns the raw bytes representation of the message id.
|
short |
getSequenceId()
Returns the sequence id generated when the message was written.
|
int |
hashCode() |
static int |
putRawId(long publishTimestamp,
short sequenceId,
long writeTimestamp,
short payloadSequenceId,
byte[] buffer,
int offset)
Computes the message raw ID and store it in the given byte array.
|
public static final int RAW_ID_SIZE
public MessageId(byte[] rawId)
public static int putRawId(long publishTimestamp,
short sequenceId,
long writeTimestamp,
short payloadSequenceId,
byte[] buffer,
int offset)
publishTimestamp - publish timestamp of the messagesequenceId - publish sequence id of the messagewriteTimestamp - write timestamp in the payload table of the messagepayloadSequenceId - sequence id in the payload table of the messagebuffer - the buffer to encode raw id tooffset - the starting offset in the buffer for storing the raw message idpublic long getPublishTimestamp()
public short getSequenceId()
public long getPayloadWriteTimestamp()
0 will be returned.public short getPayloadSequenceId()
0 will be returned.public byte[] getRawId()
Copyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.