StateRestoreCallback Contract

StateRestoreCallback is the abstraction of objects that can restore.

Table 1. StateRestoreCallback Contract
Method Description

restore

void restore(
  byte[] key,
  byte[] value)

Used exclusively when StateRestoreCallbackAdapter factory object is requested for a RecordBatchingStateRestoreCallback for a given StateRestoreCallback (that is neither a RecordBatchingStateRestoreCallback nor a BatchingStateRestoreCallback)

Functional Interface and StateRestoreCallback’s Implementations

StateRestoreCallback is a functional interface in Java.

Functional interface is an interface that has just one abstract method (aside from the methods of java.lang.Object), and thus represents a single function contract.

In addition to the usual process of creating an interface instance by declaring and instantiating a class, instances of functional interfaces can be created with method reference expressions and lambda expressions.

Because of this simplification of the Java language, StateRestoreCallback implementations are usually anonymous classes and are defined and used in the following state stores:

The following are the regular named implementations.

Table 2. StateRestoreCallbacks (Direct Implementations and Extensions Only)
StateRestoreCallback Description

AbstractNotifyingRestoreCallback

BatchingStateRestoreCallback

results matching ""

    No results matching ""