Class CdcUtilityActiveCdcManager

    • Constructor Detail

      • CdcUtilityActiveCdcManager

        public CdcUtilityActiveCdcManager()
    • Method Detail

      • enabled

        public boolean enabled()
        If this manager isn't enabled then Ignite skips notifying the manager with following methods.
        Specified by:
        enabled in interface CdcManager
        Returns:
        true if manager is enabled, otherwise false.
      • 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 dataBuf is a continuation of the previous one.
        • dataBuf contains 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).
        • dataBuf must 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 dataBuf within 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 Throwable throwed from this method.
        Specified by:
        collect in interface CdcManager
        Parameters:
        dataBuf - Buffer that contains data to collect.