Package io.debezium.embedded
Interface ConnectorOutputTest.TestData
-
- All Superinterfaces:
AutoCloseable
- Enclosing class:
- ConnectorOutputTest
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface ConnectorOutputTest.TestData extends AutoCloseable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()If records are being recorded, then complete writing them and close all resources associated with the test data.Iterator<Document>read()Read the records that are expected by the test.default voidwrite(Document sourceRecord)Record the function that should be called with each of the actual records output by the connector.
-
-
-
Method Detail
-
read
Iterator<Document> read() throws IOException
Read the records that are expected by the test.- Returns:
- the expected records, or null if there are none
- Throws:
IOException- if there is a problem reading the expected records
-
write
default void write(Document sourceRecord)
Record the function that should be called with each of the actual records output by the connector. By default this method does nothing.- Parameters:
sourceRecord- the JSON representation of the source record; never null
-
close
default void close() throws IOExceptionIf records are being recorded, then complete writing them and close all resources associated with the test data. By default this method does nothing.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- if there is a problem writing the expected records
-
-