Package org.apache.ignite.internal.cdc
Class CdcUtilityActiveCdcManager
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter
-
- org.apache.ignite.internal.cdc.CdcUtilityActiveCdcManager
-
- All Implemented Interfaces:
CdcManager,PartitionsExchangeAware,GridCacheSharedManager
public class CdcUtilityActiveCdcManager extends GridCacheSharedManagerAdapter implements CdcManager, PartitionsExchangeAware
CDC manager that delegates consuming CDC events to theCdcMainutility.
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter
cctx, diagnosticLog, log
-
-
Constructor Summary
Constructors Constructor Description CdcUtilityActiveCdcManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollect(ByteBuffer dataBuf)Callback to collect written WAL records.booleanenabled()If this manager isn't enabled then Ignite skips notifying the manager with following methods.voidonDoneAfterTopologyUnlock(GridDhtPartitionsExchangeFuture fut)Callback from exchange process completion; called after topology is unlocked.protected voidstart0()-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter
context, isStopping, kernalStartInfo, kernalStopInfo, onDisconnected, onKernalStart, onKernalStart0, onKernalStop, onKernalStop0, onReconnected, printMemoryStats, start, startInfo, stop, stop0, stopInfo, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.cdc.CdcManager
afterBinaryMemoryRestore
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheSharedManager
onDisconnected, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stop
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.distributed.dht.preloader.PartitionsExchangeAware
onDoneBeforeTopologyUnlock, onInitAfterTopologyLock, onInitBeforeTopologyLock
-
-
-
-
Method Detail
-
start0
protected void start0()
- Overrides:
start0in classGridCacheSharedManagerAdapter
-
onDoneAfterTopologyUnlock
public void onDoneAfterTopologyUnlock(GridDhtPartitionsExchangeFuture fut)
Description copied from interface:PartitionsExchangeAwareCallback from exchange process completion; called after topology is unlocked.- Specified by:
onDoneAfterTopologyUnlockin interfacePartitionsExchangeAware- Parameters:
fut- Partition map exchange future.
-
enabled
public boolean enabled()
If this manager isn't enabled then Ignite skips notifying the manager with following methods.- Specified by:
enabledin interfaceCdcManager- Returns:
trueif manager is enabled, otherwisefalse.
-
collect
public void collect(ByteBuffer dataBuf)
Callback to collect written WAL records. The provided buffer is a continuous part of WAL segment file. The buffer might contain full content of a segment or only piece of it. There are guarantees:- This method is invoked sequentially.
- Provided
dataBufis a continuation of the previous one. dataBufcontains finite number of completed WAL records. No partially written WAL records are present.- Records can be read from the buffer with
RecordSerializer.readRecord(FileInput, WALPointer). dataBufmust not be changed within this method.
Implementation suggestions:
-
Frequence of calling the method depends on frequence of fsyncing WAL segment.
See
IgniteSystemProperties.IGNITE_WAL_SEGMENT_SYNC_TIMEOUT. -
It must handle the content of the
dataBufwithin the calling thread. Content of the buffer will not be changed before this method returns. - It must not block the calling thread and work quickly.
- Ignite will ignore any
Throwablethrowed from this method.
- Specified by:
collectin interfaceCdcManager- Parameters:
dataBuf- Buffer that contains data to collect.
-
-