Class AbstractConnectorTest.SourceRecords

java.lang.Object
io.debezium.embedded.AbstractConnectorTest.SourceRecords
Enclosing class:
AbstractConnectorTest

protected class AbstractConnectorTest.SourceRecords extends Object
  • Field Details

    • records

      private final List<org.apache.kafka.connect.source.SourceRecord> records
    • recordsByTopic

      private final Map<String,List<org.apache.kafka.connect.source.SourceRecord>> recordsByTopic
    • ddlRecordsByDbName

      private final Map<String,List<org.apache.kafka.connect.source.SourceRecord>> ddlRecordsByDbName
  • Constructor Details

    • SourceRecords

      protected SourceRecords()
  • Method Details

    • add

      public void add(org.apache.kafka.connect.source.SourceRecord record)
    • getAffectedDatabase

      protected String getAffectedDatabase(org.apache.kafka.connect.source.SourceRecord record)
    • ddlRecordsForDatabase

      public List<org.apache.kafka.connect.source.SourceRecord> ddlRecordsForDatabase(String dbName)
      Get the DDL events for the named database.
      Parameters:
      dbName - the name of the database; may not be null
      Returns:
      the DDL-related events; never null but possibly empty
    • databaseNames

      public Set<String> databaseNames()
      Get the names of the databases that were affected by the DDL statements.
      Returns:
      the set of database names; never null but possibly empty
    • recordsForTopic

      public List<org.apache.kafka.connect.source.SourceRecord> recordsForTopic(String topicName)
      Get the records on the given topic.
      Parameters:
      topicName - the name of the topic.
      Returns:
      the records for the topic; possibly null if there were no records produced on the topic
    • topics

      public Set<String> topics()
      Get the set of topics for which records were received.
      Returns:
      the names of the topics; never null
    • forEachInTopic

      public void forEachInTopic(String topic, Consumer<org.apache.kafka.connect.source.SourceRecord> consumer)
    • forEach

      public void forEach(Consumer<org.apache.kafka.connect.source.SourceRecord> consumer)
    • allRecordsInOrder

      public List<org.apache.kafka.connect.source.SourceRecord> allRecordsInOrder()
    • print

      public void print()