Class MirrorTopicDescription
java.lang.Object
org.apache.kafka.clients.admin.MirrorTopicDescription
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe state of the topic mirroring.Constructor Summary
ConstructorsConstructorDescriptionMirrorTopicDescription(String linkName, Uuid linkId, String sourceTopic, int numPartitions, MirrorTopicDescription.State state, long stateTimeMs, List<Long> stoppedLogEndOffsets, List<Integer> stoppedEpochs, Uuid sourceTopicId, MirrorTopicError mirrorTopicError, List<ClusterLinkTaskError> mirrorStateTransitionErrors, long stoppedSequenceNumber, Uuid localTopicId) Creates a topic mirror description with the specified parameters.MirrorTopicDescription(String linkName, Uuid linkId, String sourceTopic, int numPartitions, MirrorTopicDescription.State state, long stateTimeMs, List<Long> stoppedLogEndOffsets, Uuid sourceTopicId, MirrorTopicError mirrorTopicError) MirrorTopicDescription(String linkName, Uuid linkId, String sourceTopic, int numPartitions, MirrorTopicDescription.State state, long stateTimeMs, List<Long> stoppedLogEndOffsets, Uuid sourceTopicId, MirrorTopicError mirrorTopicError, List<ClusterLinkTaskError> mirrorStateTransitionErrors) Method Summary
Modifier and TypeMethodDescriptionThe Uuid of the cluster link for the mirror topic.booleaninthashCode()linkId()Deprecated.linkName()The name of the cluster link for the mirror topic.Deprecated.intThe number of partitions for the mirror topic.The name of the topic that is being mirrored over the cluster link.The source topic id for the mirror topic, otherwise ZERO_UUID if not known.state()The current state of topic mirroring.longThe time, in milliseconds from epoch, when the last state transition happened.The list of leader epochs when the mirror topic is stopped in the ascending order of the partition ids.The list of log end offsets when the mirror topic is stopped in the ascending order of the partition ids.longtoString()
Constructor Details
MirrorTopicDescription
public MirrorTopicDescription(String linkName, Uuid linkId, String sourceTopic, int numPartitions, MirrorTopicDescription.State state, long stateTimeMs, List<Long> stoppedLogEndOffsets, Uuid sourceTopicId, MirrorTopicError mirrorTopicError) MirrorTopicDescription
public MirrorTopicDescription(String linkName, Uuid linkId, String sourceTopic, int numPartitions, MirrorTopicDescription.State state, long stateTimeMs, List<Long> stoppedLogEndOffsets, Uuid sourceTopicId, MirrorTopicError mirrorTopicError, List<ClusterLinkTaskError> mirrorStateTransitionErrors) MirrorTopicDescription
public MirrorTopicDescription(String linkName, Uuid linkId, String sourceTopic, int numPartitions, MirrorTopicDescription.State state, long stateTimeMs, List<Long> stoppedLogEndOffsets, List<Integer> stoppedEpochs, Uuid sourceTopicId, MirrorTopicError mirrorTopicError, List<ClusterLinkTaskError> mirrorStateTransitionErrors, long stoppedSequenceNumber, Uuid localTopicId) Creates a topic mirror description with the specified parameters.- Parameters:
linkName- the name of the cluster link over which the topic mirrors fromlinkId- the Uuid of the cluster link over which the topic mirrors fromsourceTopic- the name of the topic on the source cluster that's mirrorednumPartitions- the number of partitions for the mirror topicstate- the state of topic mirroringstateTimeMs- the time, in milliseconds from epoch, when the last state transition happenedstoppedLogEndOffsets- the list of log end offsets at which mirror topic is stopped for each partition id in ascending order.stoppedEpochs- the list of partition leader epochs at which mirror topic is stopped for each partition id in ascending order.sourceTopicId- the source topic id for the mirror topic, ZERO_UUID if not knownmirrorTopicError- Reason for mirror failure if this mirror is in failed statemirrorStateTransitionErrors- List of mirror state transition errors for the topicstoppedSequenceNumber- the stopped sequence number of the topiclocalTopicId- the local topic id of the topic
Method Details
linkName
The name of the cluster link for the mirror topic.linkId
Deprecated.The UUID of the cluster link for the mirror topic. Deprecated since 7.1.0. Please useclusterLinkId().clusterLinkId
The Uuid of the cluster link for the mirror topic.mirrorTopic
Deprecated.The name of the topic that is being mirrored over the cluster link. This method is being deprecated because mirrorTopic is not an accurate name to describe a method that returns the source topic's name.Please use
sourceTopic().sourceTopic
The name of the topic that is being mirrored over the cluster link.numPartitions
public int numPartitions()The number of partitions for the mirror topic.state
The current state of topic mirroring.stateTimeMs
public long stateTimeMs()The time, in milliseconds from epoch, when the last state transition happened.stoppedLogEndOffsets
stoppedEpochs
sourceTopicId
The source topic id for the mirror topic, otherwise ZERO_UUID if not known.mirrorTopicError
mirrorStateTransitionErrors
stoppedSequenceNumber
public long stoppedSequenceNumber()localTopicId
toString
equals
hashCode