use of org.apache.kafka.streams.processor.StateRestoreCallback in project kafka by apache.
the class RocksDBSegmentedBytesStore method init.
@Override
public void init(ProcessorContext context, StateStore root) {
this.context = context;
segments.openExisting(context);
// register and possibly restore the state from the logs
context.register(root, false, new StateRestoreCallback() {
@Override
public void restore(byte[] key, byte[] value) {
put(Bytes.wrap(key), value);
}
});
flush();
open = true;
}
Aggregations