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
|
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
MessageId
fromByteArray
in interface MessageId
data
- byte array containing the serialized message idIOException
protected byte[] toByteArray(int batchIndex)
public byte[] toByteArray()
MessageId
toByteArray
in interface MessageId
public int compareTo(MessageId o)
compareTo
in interface Comparable<MessageId>
Copyright © 2017–2018 Apache Software Foundation. All rights reserved.