BatchingStateRestoreCallback
, StateRestoreCallback
, StateRestoreListener
public abstract class AbstractNotifyingBatchingRestoreCallback extends java.lang.Object implements BatchingStateRestoreCallback, StateRestoreListener
BatchingStateRestoreCallback
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 | Description |
---|---|
AbstractNotifyingBatchingRestoreCallback() |
Modifier and Type | Method | 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. |
void |
restore(byte[] key,
byte[] value) |
Single put restore operations not supported, please use
AbstractNotifyingRestoreCallback
or StateRestoreCallback instead for single action restores. |
restoreAll
public AbstractNotifyingBatchingRestoreCallback()
public void restore(byte[] key, byte[] value)
AbstractNotifyingRestoreCallback
or StateRestoreCallback
instead for single action restores.restore
in interface StateRestoreCallback
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.