public class DelegatingStatePersistor extends Object implements StatePersistor
StatePersistor
that uses a DatasetContext
to read and
persist state. This is needed to make it possible that the user can define a
DatasetStatePersistor, without access to an instance of a DatasetContext (from a Worker, for
instance).Constructor and Description |
---|
DelegatingStatePersistor(DatasetContext datasetContext,
DatasetStatePersistor datasetStatePersistor) |
Modifier and Type | Method and Description |
---|---|
void |
persistState(byte[] state)
Writes the serialized bytes of the state of the partition consuming process.
|
byte[] |
readState() |
public DelegatingStatePersistor(DatasetContext datasetContext, DatasetStatePersistor datasetStatePersistor)
@Nullable public byte[] readState()
readState
in interface StatePersistor
public void persistState(byte[] state)
StatePersistor
persistState
in interface StatePersistor
state
- the bytes to persistCopyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.