StateRestorer

StateRestorer is a concrete BatchingStateRestoreCallback and a StateRestoreListener.

StateRestorer uses a CompositeRestoreListener to propagate the events: restoreStarted, restoreDone, restoreBatchCompleted, and restore.

StateRestorer is created exclusively when ProcessorStateManager is requested to register a state store.

StateRestorer uses -1 as a marker for an uninitialized partition offset.

Creating StateRestorer Instance

StateRestorer takes the following to be created:

StateRestorer initializes the internal properties.

restoreBatchCompleted Method

void restoreBatchCompleted(long currentRestoredOffset, int numRestored)

restoreBatchCompleted…​FIXME

Note
restoreBatchCompleted is used exclusively when StoreChangelogReader is requested to processNext (when requested to restore).

restoreStarted Method

void restoreStarted()

restoreStarted…​FIXME

Note
restoreStarted is used exclusively when StoreChangelogReader is requested to startRestoration (when requested to initialize as part of restore).

restoreDone Method

void restoreDone()

restoreDone…​FIXME

Note
restoreDone is used exclusively when StoreChangelogReader is requested to processNext (when requested to restore).

restore Method

void restore(final Collection<KeyValue<byte[], byte[]>> records)

restore…​FIXME

Note
restore is used exclusively when StoreChangelogReader is requested to restore.

Setting StateRestoreListener — setUserRestoreListener Method

void setUserRestoreListener(StateRestoreListener userRestoreListener)

setUserRestoreListener simply requests the CompositeRestoreListener to use the input StateRestoreListener.

Note
setUserRestoreListener is used exclusively when StoreChangelogReader is requested to register a StateRestorer.

isPersistent Method

boolean isPersistent()

isPersistent returns the persistent flag.

Note
isPersistent is used exclusively when StoreChangelogReader is requested to restoredOffsets.

setStartingOffset Method

void setStartingOffset(long startingOffset)

setStartingOffset simply sets the startingOffset internal registry to the minimum value of the offsetLimit and the given startingOffset.

Note
setStartingOffset is used when…​FIXME

Internal Properties

Name Description

checkpointOffset

Checkpoint offset

Used when…​FIXME

startingOffset

Used when…​FIXME

results matching ""

    No results matching ""