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) |
static MessageIdImpl |
convertToMessageIdImpl(MessageId messageId) |
boolean |
equals(Object obj) |
static MessageId |
fromByteArray(byte[] data) |
static MessageId |
fromByteArrayWithTopic(byte[] data,
String topicName) |
static MessageId |
fromByteArrayWithTopic(byte[] data,
TopicName topicName) |
long |
getEntryId() |
long |
getLedgerId() |
int |
getPartitionIndex() |
int |
hashCode() |
byte[] |
toByteArray() |
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
fromByteArray in interface MessageIdIOExceptionpublic static MessageIdImpl convertToMessageIdImpl(MessageId messageId)
public static MessageId fromByteArrayWithTopic(byte[] data, String topicName) throws IOException
fromByteArrayWithTopic in interface MessageIdIOExceptionpublic static MessageId fromByteArrayWithTopic(byte[] data, TopicName topicName) throws IOException
IOExceptionprotected byte[] toByteArray(int batchIndex)
public byte[] toByteArray()
toByteArray in interface MessageIdpublic int compareTo(MessageId o)
compareTo in interface Comparable<MessageId>Copyright © 2017–2020 Apache Software Foundation. All rights reserved.