Class CustomConverterRegistry

java.lang.Object
io.debezium.relational.CustomConverterRegistry
All Implemented Interfaces:
Service

@ThreadSafe public class CustomConverterRegistry extends Object implements Service
The registry of all converters that were provided by the connector configuration.
Author:
Jiri Pechanec
  • Field Details

    • converters

      @Immutable private final List<io.debezium.spi.converter.CustomConverter<org.apache.kafka.connect.data.SchemaBuilder,io.debezium.spi.converter.ConvertedField>> converters
    • conversionFunctionMap

      private final Map<String,CustomConverterRegistry.ConverterDefinition<org.apache.kafka.connect.data.SchemaBuilder>> conversionFunctionMap
  • Constructor Details

    • CustomConverterRegistry

      public CustomConverterRegistry(List<io.debezium.spi.converter.CustomConverter<org.apache.kafka.connect.data.SchemaBuilder,io.debezium.spi.converter.ConvertedField>> converters)
  • Method Details

    • registerConverterFor

      public Optional<org.apache.kafka.connect.data.SchemaBuilder> registerConverterFor(TableId table, Column column, Object defaultValue)
      Create and register a converter for a given database column.
      Parameters:
      table - the table that contains the column
      column - the column metadata
      Returns:
      the schema of the value generated by the converter or empty if converter does not support the column
    • getValueConverter

      public Optional<ValueConverter> getValueConverter(TableId table, Column column)
      Obtain a pre-registered converter for a given column.
      Parameters:
      table - the table that contains the column
      column - the column metadata
      Returns:
      the the value converter or empty if converter does not support the column
    • isEmpty

      public boolean isEmpty()
      Returns:
      true if no custom converters will be used by the connector
    • fullColumnName

      private String fullColumnName(TableId table, Column column)