public class WalRecordsConsumer<K,V> extends Object
CdcMain,
CdcConsumer| Modifier and Type | Class and Description |
|---|---|
static class |
WalRecordsConsumer.DataEntryIterator
Iterator over
DataEntry. |
| Modifier and Type | Field and Description |
|---|---|
static String |
EVTS_CNT
Events count metric name.
|
static String |
LAST_EVT_TIME
Last event time metric name.
|
| Constructor and Description |
|---|
WalRecordsConsumer(CdcConsumer consumer,
IgniteLogger log) |
| Modifier and Type | Method and Description |
|---|---|
CdcConsumer |
consumer() |
boolean |
onRecords(Iterator<DataEntry> entries)
Handles data entries.
|
void |
start(MetricRegistry cdcReg,
MetricRegistry cdcConsumerReg)
Starts the consumer.
|
void |
stop()
Stops the consumer.
|
String |
toString() |
public static final String EVTS_CNT
public static final String LAST_EVT_TIME
public WalRecordsConsumer(CdcConsumer consumer, IgniteLogger log)
consumer - User provided CDC consumer.log - Logger.public boolean onRecords(Iterator<DataEntry> entries)
true then current offset in WAL and DataEntry index inside
DataRecord will be stored and WAL iteration will be started from it on CDC application fail/restart.entries - Data entries iterator.True if current offset in WAL should be commited.public void start(MetricRegistry cdcReg, MetricRegistry cdcConsumerReg) throws IgniteCheckedException
cdcReg - CDC metric registry.cdcConsumerReg - CDC consumer metric registry.IgniteCheckedException - If failed.public void stop()
start(MetricRegistry, MetricRegistry).public CdcConsumer consumer()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.13.0 Release Date : April 20 2022