Package org.apache.pulsar.client.impl
Class MessageIdImpl
- java.lang.Object
-
- org.apache.pulsar.client.impl.MessageIdImpl
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<org.apache.pulsar.client.api.MessageId>,org.apache.pulsar.client.api.MessageId
- Direct Known Subclasses:
BatchMessageIdImpl
public class MessageIdImpl extends java.lang.Object implements org.apache.pulsar.client.api.MessageId- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected longentryIdprotected longledgerIdprotected intpartitionIndex
-
Constructor Summary
Constructors Constructor Description MessageIdImpl(long ledgerId, long entryId, int partitionIndex)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(org.apache.pulsar.client.api.MessageId o)static MessageIdImplconvertToMessageIdImpl(org.apache.pulsar.client.api.MessageId messageId)booleanequals(java.lang.Object o)static org.apache.pulsar.client.api.MessageIdfromByteArray(byte[] data)static org.apache.pulsar.client.api.MessageIdfromByteArrayWithTopic(byte[] data, java.lang.String topicName)static org.apache.pulsar.client.api.MessageIdfromByteArrayWithTopic(byte[] data, org.apache.pulsar.common.naming.TopicName topicName)longgetEntryId()longgetLedgerId()intgetPartitionIndex()inthashCode()byte[]toByteArray()protected byte[]toByteArray(int batchIndex, int batchSize)java.lang.StringtoString()
-
-
-
Method Detail
-
getLedgerId
public long getLedgerId()
-
getEntryId
public long getEntryId()
-
getPartitionIndex
public int getPartitionIndex()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
fromByteArray
public static org.apache.pulsar.client.api.MessageId fromByteArray(byte[] data) throws java.io.IOException- Throws:
java.io.IOException
-
convertToMessageIdImpl
public static MessageIdImpl convertToMessageIdImpl(org.apache.pulsar.client.api.MessageId messageId)
-
fromByteArrayWithTopic
public static org.apache.pulsar.client.api.MessageId fromByteArrayWithTopic(byte[] data, java.lang.String topicName) throws java.io.IOException- Throws:
java.io.IOException
-
fromByteArrayWithTopic
public static org.apache.pulsar.client.api.MessageId fromByteArrayWithTopic(byte[] data, org.apache.pulsar.common.naming.TopicName topicName) throws java.io.IOException- Throws:
java.io.IOException
-
toByteArray
protected byte[] toByteArray(int batchIndex, int batchSize)
-
toByteArray
public byte[] toByteArray()
- Specified by:
toByteArrayin interfaceorg.apache.pulsar.client.api.MessageId
-
compareTo
public int compareTo(org.apache.pulsar.client.api.MessageId o)
- Specified by:
compareToin interfacejava.lang.Comparable<org.apache.pulsar.client.api.MessageId>
-
-