public abstract class AbstractNotifyingRestoreCallback extends java.lang.Object implements StateRestoreCallback, StateRestoreListener
StateRestoreCallback
used for batch restoration operations.
Includes default no-op methods of the StateRestoreListener
StateRestoreListener.onRestoreStart(TopicPartition, String, long, long)
,
StateRestoreListener.onBatchRestored(TopicPartition, String, long, long)
, and StateRestoreListener.onRestoreEnd(TopicPartition, String, long)
.Constructor and Description |
---|
AbstractNotifyingRestoreCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onBatchRestored(TopicPartition topicPartition,
java.lang.String storeName,
long batchEndOffset,
long numRestored)
Method called after restoring a batch of records.
|
void |
onRestoreEnd(TopicPartition topicPartition,
java.lang.String storeName,
long totalRestored)
Method called when restoring the
StateStore is complete. |
void |
onRestoreStart(TopicPartition topicPartition,
java.lang.String storeName,
long startingOffset,
long endingOffset)
Method called at the very beginning of
StateStore restoration. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
restore
public void onRestoreStart(TopicPartition topicPartition, java.lang.String storeName, long startingOffset, long endingOffset)
StateRestoreListener
StateStore
restoration.onRestoreStart
in interface StateRestoreListener
topicPartition
- the TopicPartition containing the values to restorestoreName
- the name of the store undergoing restorationstartingOffset
- the starting offset of the entire restoration process for this TopicPartitionendingOffset
- the exclusive ending offset of the entire restoration process for this TopicPartitionThis method does nothing by default; if desired, subclasses should override it with custom functionality.
public void onBatchRestored(TopicPartition topicPartition, java.lang.String storeName, long batchEndOffset, long numRestored)
StateRestoreListener
onBatchRestored
in interface StateRestoreListener
topicPartition
- the TopicPartition containing the values to restorestoreName
- the name of the store undergoing restorationbatchEndOffset
- the inclusive ending offset for the current restored batch for this TopicPartitionnumRestored
- the total number of records restored in this batch for this TopicPartitionThis method does nothing by default; if desired, subclasses should override it with custom functionality.
public void onRestoreEnd(TopicPartition topicPartition, java.lang.String storeName, long totalRestored)
StateRestoreListener
StateStore
is complete.onRestoreEnd
in interface StateRestoreListener
topicPartition
- the TopicPartition containing the values to restorestoreName
- the name of the store just restoredtotalRestored
- the total number of records restored for this TopicPartitionThis method does nothing by default; if desired, subclasses should override it with custom functionality.