1818 */
1919package org .apache .pulsar .client .impl ;
2020
21- import java .util .BitSet ;
2221import org .apache .pulsar .client .api .MessageId ;
23- import org .apache .pulsar .client .api .MessageIdAdv ;
2422import org .apache .pulsar .client .api .TopicMessageId ;
2523
26- public class TopicMessageIdImpl implements MessageIdAdv , TopicMessageId {
24+ public class TopicMessageIdImpl extends TopicMessageId . Impl {
2725
28- /** This topicPartitionName is get from ConsumerImpl, it contains partition part. */
29- private final String topicPartitionName ;
3026 private final String topicName ;
31- private final MessageIdAdv messageId ;
3227
3328 public TopicMessageIdImpl (String topicPartitionName , String topicName , MessageId messageId ) {
34- this .messageId = (MessageIdAdv ) messageId ;
35- this .topicPartitionName = topicPartitionName ;
29+ super (topicPartitionName , messageId );
3630 this .topicName = topicName ;
3731 }
3832
@@ -51,71 +45,6 @@ public String getTopicName() {
5145 */
5246 @ Deprecated
5347 public String getTopicPartitionName () {
54- return this .topicPartitionName ;
55- }
56-
57- @ Override
58- public String toString () {
59- return messageId .toString ();
60- }
61-
62- @ Override
63- public byte [] toByteArray () {
64- return messageId .toByteArray ();
65- }
66-
67- @ Override
68- public int hashCode () {
69- return messageId .hashCode ();
70- }
71-
72- @ Override
73- public boolean equals (Object obj ) {
74- return messageId .equals (obj );
75- }
76-
77- @ Override
78- public int compareTo (MessageId o ) {
79- return messageId .compareTo (o );
80- }
81-
82- @ Override
83- public long getLedgerId () {
84- return messageId .getLedgerId ();
85- }
86-
87- @ Override
88- public long getEntryId () {
89- return messageId .getEntryId ();
90- }
91-
92- @ Override
93- public int getPartitionIndex () {
94- return messageId .getPartitionIndex ();
95- }
96-
97- @ Override
98- public int getBatchIndex () {
99- return messageId .getBatchIndex ();
100- }
101-
102- @ Override
103- public int getBatchSize () {
104- return messageId .getBatchSize ();
105- }
106-
107- @ Override
108- public BitSet getAckSet () {
109- return messageId .getAckSet ();
110- }
111-
112- @ Override
113- public MessageIdAdv getFirstChunkMessageId () {
114- return messageId .getFirstChunkMessageId ();
115- }
116-
117- @ Override
118- public String getOwnerTopic () {
119- return topicPartitionName ;
48+ return getOwnerTopic ();
12049 }
12150}
0 commit comments