public class WalRecordsConsumer<K,V> extends Object
CdcMain,
CdcConsumer| 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<DataRecord> recs)
Handles record from the WAL.
|
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<DataRecord> recs)
true then current offset in WAL will be stored and WAL iteration will be
started from it on CDC application fail/restart.recs - WAL records 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.12.0 Release Date : January 10 2022