public class MessageIdImpl extends Object implements MessageId
| Modifier and Type | Field and Description |
|---|---|
protected long |
entryId |
protected long |
ledgerId |
protected int |
partitionIndex |
| Constructor and Description |
|---|
MessageIdImpl(long ledgerId,
long entryId,
int partitionIndex) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MessageId o) |
boolean |
equals(Object obj) |
static MessageId |
fromByteArray(byte[] data)
De-serialize a message id from a byte array
|
static MessageId |
fromByteArrayWithTopic(byte[] data,
TopicName topicName) |
long |
getEntryId() |
long |
getLedgerId() |
int |
getPartitionIndex() |
int |
hashCode() |
byte[] |
toByteArray()
Serialize the message ID into a byte array
|
protected byte[] |
toByteArray(int batchIndex) |
String |
toString() |
protected final long ledgerId
protected final long entryId
protected final int partitionIndex
public MessageIdImpl(long ledgerId,
long entryId,
int partitionIndex)
public long getLedgerId()
public long getEntryId()
public int getPartitionIndex()
public static MessageId fromByteArray(byte[] data) throws IOException
MessageIdfromByteArray in interface MessageIddata - byte array containing the serialized message idIOExceptionpublic static MessageId fromByteArrayWithTopic(byte[] data, TopicName topicName) throws IOException
fromByteArrayWithTopic in interface MessageIdIOExceptionprotected byte[] toByteArray(int batchIndex)
public byte[] toByteArray()
MessageIdtoByteArray in interface MessageIdpublic int compareTo(MessageId o)
compareTo in interface Comparable<MessageId>Copyright © 2017–2018 Apache Software Foundation. All rights reserved.