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 newStatePartitionRestoreInfo
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Duration
getDuration()
Gets the duration of the restoration process.long
getEndingOffset()
Gets the exclusive ending offset of the entire restoration process for this TopicPartitionint
getPartition()
Gets the Partition being restored.long
getStartingOffset()
Gets the starting offset of the entire restoration process for this TopicPartition.String
getTopic()
Gets the Topic of the partition being restored.long
getTotalRestored()
Gets the total number of records restored.long
incrementTotalRestored(long numRestored)
Increments the total number of records restored.void
setDuration(Duration duration)
Sets the duration of the restoration process.String
toString()
-
-
-
Constructor Detail
-
StatePartitionRestoreInfo
public StatePartitionRestoreInfo(org.apache.kafka.common.TopicPartition topicPartition, long startingOffset, long endingOffset)
Creates a newStatePartitionRestoreInfo
instance.- Parameters:
topicPartition
- theTopicPartition
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.
-
-