Class MirrorTopicDescription

java.lang.Object
org.apache.kafka.clients.admin.MirrorTopicDescription

@Evolving public class MirrorTopicDescription extends Object
A description of a topic's mirroring state.
  • 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 from
      linkId - the Uuid of the cluster link over which the topic mirrors from
      sourceTopic - the name of the topic on the source cluster that's mirrored
      numPartitions - the number of partitions for the mirror topic
      state - the state of topic mirroring
      stateTimeMs - the time, in milliseconds from epoch, when the last state transition happened
      stoppedLogEndOffsets - 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 known
      mirrorTopicError - Reason for mirror failure if this mirror is in failed state
      mirrorStateTransitionErrors - List of mirror state transition errors for the topic
      stoppedSequenceNumber - the stopped sequence number of the topic
      localTopicId - the local topic id of the topic
  • Method Details

    • linkName

      public String linkName()
      The name of the cluster link for the mirror topic.
    • linkId

      @Deprecated public UUID linkId()
      Deprecated.
      The UUID of the cluster link for the mirror topic. Deprecated since 7.1.0. Please use clusterLinkId().
    • clusterLinkId

      public Uuid clusterLinkId()
      The Uuid of the cluster link for the mirror topic.
    • mirrorTopic

      @Deprecated public String 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

      public String 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

      public List<Long> stoppedLogEndOffsets()
      The list of log end offsets when the mirror topic is stopped in the ascending order of the partition ids. Empty if the mirror topic is not stopped or the info is not available.
    • stoppedEpochs

      public List<Integer> stoppedEpochs()
      The list of leader epochs when the mirror topic is stopped in the ascending order of the partition ids. Empty if the mirror topic is not stopped or the info is not available.
    • sourceTopicId

      public Uuid sourceTopicId()
      The source topic id for the mirror topic, otherwise ZERO_UUID if not known.
    • mirrorTopicError

      public MirrorTopicError mirrorTopicError()
    • mirrorStateTransitionErrors

      public List<ClusterLinkTaskError> mirrorStateTransitionErrors()
    • stoppedSequenceNumber

      public long stoppedSequenceNumber()
    • localTopicId

      public Uuid localTopicId()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object