public class CdcConsumerState extends Object
CdcConsumer.onEvents(Iterator) returns true
current offset in WAL segment and DataEntry index inside DataRecord saved to file.
This allows to the CdcConsumer to continue consumption of the CdcEvent
from the last saved offset in case of fail or restart.CdcConsumer.onEvents(Iterator),
CdcMain| Modifier and Type | Field and Description |
|---|---|
static String |
STATE_FILE_NAME |
| Constructor and Description |
|---|
CdcConsumerState(Path stateDir) |
| Modifier and Type | Method and Description |
|---|---|
T2<WALPointer,Integer> |
load()
Loads CDC state from file.
|
void |
save(T2<WALPointer,Integer> state)
Saves state to file.
|
public static final String STATE_FILE_NAME
public CdcConsumerState(Path stateDir)
stateDir - State directory.public void save(T2<WALPointer,Integer> state) throws IOException
state - WAL pointer and index of DataEntry inside DataRecord.IOExceptionpublic T2<WALPointer,Integer> load()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.13.0 Release Date : April 20 2022