Class ChainedReaderTest.MockReader

  • All Implemented Interfaces:
    io.debezium.connector.mysql.legacy.Reader
    Direct Known Subclasses:
    ChainedReaderTest.CompletingMockReader
    Enclosing class:
    ChainedReaderTest

    public static class ChainedReaderTest.MockReader
    extends Object
    implements io.debezium.connector.mysql.legacy.Reader
    A Reader that returns records until manually stopped.
    • Constructor Detail

      • MockReader

        public MockReader​(String name,
                          Supplier<List<org.apache.kafka.connect.source.SourceRecord>> pollResultsSupplier)
    • Method Detail

      • state

        public io.debezium.connector.mysql.legacy.Reader.State state()
        Specified by:
        state in interface io.debezium.connector.mysql.legacy.Reader
      • name

        public String name()
        Specified by:
        name in interface io.debezium.connector.mysql.legacy.Reader
      • continueReturningRecordsFromPolling

        protected boolean continueReturningRecordsFromPolling()
      • start

        public void start()
        Specified by:
        start in interface io.debezium.connector.mysql.legacy.Reader
      • stop

        public void stop()
        Specified by:
        stop in interface io.debezium.connector.mysql.legacy.Reader
      • uponCompletion

        public void uponCompletion​(Runnable handler)
        Specified by:
        uponCompletion in interface io.debezium.connector.mysql.legacy.Reader
      • initialize

        public void initialize()
        Specified by:
        initialize in interface io.debezium.connector.mysql.legacy.Reader
      • destroy

        public void destroy()
        Specified by:
        destroy in interface io.debezium.connector.mysql.legacy.Reader