public interface CdcManager extends GridCacheSharedManager, DatabaseLifecycleListener
CdcManager and
CdcMain components is established through CDC management WAL records. CdcManager logs them, while CdcMain
listens to them:
CdcManagerRecord with committed consumer state. This record will be handled by
CdcMain the same way it handles CdcConsumer.onEvents(Iterator) when it returns true.
CdcManagerStopRecord after it stopped handling records by any reason.
CdcMain will start consume records instead since CdcManagerRecord.walState() of
last consumed CdcManagerRecord.
CdcUtilityActiveCdcManager. It is disabled from the
beginning, logs the CdcManagerStopRecord after Ignite node started, and then delegates consuming CDC
events to the CdcMain utility.
PluginProvider
that will return the implementation with PluginProvider.createComponent(PluginContext, Class) method.
The Class parameter in the method is CdcManager class.| Modifier and Type | Method and Description |
|---|---|
default void |
afterBinaryMemoryRestore(IgniteCacheDatabaseSharedManager mgr,
GridCacheDatabaseSharedManager.RestoreBinaryState restoreState)
Callback is executed only once on Ignite node start when binary memory has fully restored and WAL logging is resumed.
|
void |
collect(ByteBuffer dataBuf)
Callback to collect written WAL records.
|
boolean |
enabled()
If this manager isn't enabled then Ignite skips notifying the manager with following methods.
|
onDisconnected, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stopafterInitialise, afterLogicalUpdatesApplied, beforeBinaryMemoryRestore, beforeResumeWalLogging, beforeStop, onBaselineChange, onInitDataRegionsboolean enabled()
true if manager is enabled, otherwise false.default void afterBinaryMemoryRestore(IgniteCacheDatabaseSharedManager mgr, GridCacheDatabaseSharedManager.RestoreBinaryState restoreState) throws IgniteCheckedException
collect(ByteBuffer).
Implementation suggestions:
GridInternalSubscriptionProcessor.registerDatabaseListener(DatabaseLifecycleListener)
afterBinaryMemoryRestore in interface DatabaseLifecycleListenerrestoreState - Result of binary recovery.IgniteCheckedException - If failed.void collect(ByteBuffer dataBuf)
dataBuf is a continuation of the previous one.dataBuf contains finite number of completed WAL records. No partially written WAL records are present.RecordSerializer.readRecord(FileInput, WALPointer).dataBuf must not be changed within this method.Implementation suggestions:
IgniteSystemProperties.IGNITE_WAL_SEGMENT_SYNC_TIMEOUT.
dataBuf within the calling thread.
Content of the buffer will not be changed before this method returns.
Throwable throwed from this method.dataBuf - Buffer that contains data to collect.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023