Class StatePartitionRestoreInfo


  • public class StatePartitionRestoreInfo
    extends Object
    Describes the state of a restoration process for TopicPartition.
    See Also:
    LoggingStateRestoreListener, StateRestoreListener
    • Constructor Detail

      • StatePartitionRestoreInfo

        public StatePartitionRestoreInfo​(org.apache.kafka.common.TopicPartition topicPartition,
                                         long startingOffset,
                                         long endingOffset)
        Creates a new StatePartitionRestoreInfo instance.
        Parameters:
        topicPartition - the TopicPartition being restore.
        startingOffset - the starting offset of the entire restoration process for this TopicPartition.
        endingOffset - the exclusive ending offset of the entire restoration process for this TopicPartition.
    • Method Detail

      • getTopic

        public String getTopic()
        Gets the Topic of the partition being restored.
      • getPartition

        public int getPartition()
        Gets the Partition being restored.
      • getStartingOffset

        public long getStartingOffset()
        Gets the starting offset of the entire restoration process for this TopicPartition.
      • getEndingOffset

        public long getEndingOffset()
        Gets the exclusive ending offset of the entire restoration process for this TopicPartition
      • getTotalRestored

        public long getTotalRestored()
        Gets the total number of records restored.
      • incrementTotalRestored

        public long incrementTotalRestored​(long numRestored)
        Increments the total number of records restored.
        Parameters:
        numRestored - number of records restored.
        Returns:
        the total restored.
      • getDuration

        public Duration getDuration()
        Gets the duration of the restoration process.
      • setDuration

        public void setDuration​(Duration duration)
        Sets the duration of the restoration process.