...
Code Block | ||
---|---|---|
| ||
public interface BatchingStateRestoreCallback extends StateRestoreCallback {
void restoreAll(Collection<KeyValue<byte[], byte []>> records);
}
public interface StateRestoreListener {
void onRestoreStart(TopicPartition topicPartition, long startingOffset);
void onBatchRestored(TopicPartition topicPartition, long batchEndOffset, long numRestored);
void onRestoreEnd(TopicPartition topicPartition, long endOffset, long totalRestored);
} |
The onBatchRestored
method is called after records retrieved from each poll()
call have been restored. This should give users a sense of progress being made in the restore process.
The number of times onBatchRestored
is called is (Total records in change log / MAX_POLL_RECORDS)
.
The changes also include adding a setter
method on the KafkaStreams
object:
...