StateRestoreListener Contract

StateRestoreListener is the contract of objects that want to be notified about the store-related events, i.e. onBatchRestored, onRestoreEnd and onRestoreStart.

Note
A Kafka Streams developer uses KafkaStreams.setGlobalStateRestoreListener method to register a StateRestoreListener in a Kafka Streams application.
Table 1. StateRestoreListener Contract
Method Description

onBatchRestored

void onBatchRestored(
  TopicPartition topicPartition,
  String storeName,
  long batchEndOffset,
  long numRestored)

Used when:

onRestoreEnd

void onRestoreEnd(
  TopicPartition topicPartition,
  String storeName,
  long totalRestored)

Used when:

onRestoreStart

void onRestoreStart(
  TopicPartition topicPartition,
  String storeName,
  long startingOffset,
  long endingOffset)

Used when:

Table 2. StateRestoreListeners (Direct Implementations)
StateRestoreListener Description

AbstractNotifyingBatchingRestoreCallback

AbstractNotifyingRestoreCallback

CompositeRestoreListener

DelegatingStateRestoreListener

results matching ""

    No results matching ""