Package org.apache.pulsar.client.impl
Class MessageIdImpl
java.lang.Object
org.apache.pulsar.client.impl.MessageIdImpl
- All Implemented Interfaces:
Serializable,Comparable<MessageId>,MessageId,MessageIdAdv
- Direct Known Subclasses:
BatchMessageIdImpl,ChunkMessageIdImpl
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longprotected final longprotected final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic MessageIdfromByteArray(byte[] data) static MessageIdfromByteArrayWithTopic(byte[] data, String topicName) static MessageIdfromByteArrayWithTopic(byte[] data, TopicName topicName) longlongintinthashCode()byte[]protected byte[]toByteArray(int batchIndex, int batchSize) toString()protected MessageIdDatawriteMessageIdData(MessageIdData msgId, int batchIndex, int batchSize) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.pulsar.client.api.MessageIdAdv
compareTo, getAckSet, getBatchIndex, getBatchSize, getFirstChunkMessageId
-
Field Details
-
ledgerId
protected final long ledgerId -
entryId
protected final long entryId -
partitionIndex
protected final int partitionIndex
-
-
Constructor Details
-
MessageIdImpl
public MessageIdImpl(long ledgerId, long entryId, int partitionIndex)
-
-
Method Details
-
getLedgerId
public long getLedgerId()- Specified by:
getLedgerIdin interfaceMessageIdAdv
-
getEntryId
public long getEntryId()- Specified by:
getEntryIdin interfaceMessageIdAdv
-
getPartitionIndex
public int getPartitionIndex()- Specified by:
getPartitionIndexin interfaceMessageIdAdv
-
hashCode
public int hashCode() -
equals
-
toString
-
fromByteArray
- Throws:
IOException
-
fromByteArrayWithTopic
- Throws:
IOException
-
fromByteArrayWithTopic
- Throws:
IOException
-
writeMessageIdData
-
toByteArray
protected byte[] toByteArray(int batchIndex, int batchSize) -
toByteArray
public byte[] toByteArray()- Specified by:
toByteArrayin interfaceMessageId
-