Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On the segment archiving, utility iterates it using existing WALIterator and notificates CDCConsumer of each record from the segment.

CDCConsumer public API interface:



Code Block
languagejava
themeMidnight
titleCDCConsumer.java
/** Consumer of WAL records */
public interface CDCConsumer {
    /**
     * @return Consumer ID.
     */
    String id();

    /**
     * Initialize this consumer.
     *
     * @param configuration Ignite configuration.
     */
    void start(IgniteConfiguration configuration, IgniteLogger log);

    /**
     * @param record WAL record.
     * @param <T> Record type.
	 * @return {@code True} if state of the consumption should be saved.
     */
    <T extends WALRecord> booolean onRecord(T record);

    /**
     * Stops this consumer.
     * This methods can be invoked only after {@link #start(IgniteConfiguration, IgniteLogger)}.
     */
    void stop();
}

...