Class StatePartitionRestoreInfo
- java.lang.Object
-
- io.streamthoughts.azkarra.commons.streams.StatePartitionRestoreInfo
-
public class StatePartitionRestoreInfo extends Object
Describes the state of a restoration process forTopicPartition.- See Also:
LoggingStateRestoreListener,StateRestoreListener
-
-
Constructor Summary
Constructors Constructor Description StatePartitionRestoreInfo(org.apache.kafka.common.TopicPartition topicPartition, long startingOffset, long endingOffset)Creates a newStatePartitionRestoreInfoinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DurationgetDuration()Gets the duration of the restoration process.longgetEndingOffset()Gets the exclusive ending offset of the entire restoration process for this TopicPartitionintgetPartition()Gets the Partition being restored.longgetStartingOffset()Gets the starting offset of the entire restoration process for this TopicPartition.StringgetTopic()Gets the Topic of the partition being restored.longgetTotalRestored()Gets the total number of records restored.longincrementTotalRestored(long numRestored)Increments the total number of records restored.voidsetDuration(Duration duration)Sets the duration of the restoration process.StringtoString()
-
-
-
Constructor Detail
-
StatePartitionRestoreInfo
public StatePartitionRestoreInfo(org.apache.kafka.common.TopicPartition topicPartition, long startingOffset, long endingOffset)Creates a newStatePartitionRestoreInfoinstance.- Parameters:
topicPartition- theTopicPartitionbeing 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.
-
-