Class CustomConverterRegistry


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

    • Method Detail

      • 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