Package io.debezium.relational
Class CustomConverterRegistry
java.lang.Object
io.debezium.relational.CustomConverterRegistry
The registry of all converters that were provided by the connector configuration.
- Author:
- Jiri Pechanec
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Class binding together the schema of the conversion result and the converter code. -
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<String,
CustomConverterRegistry.ConverterDefinition<org.apache.kafka.connect.data.SchemaBuilder>> private final List<CustomConverter<org.apache.kafka.connect.data.SchemaBuilder,
ConvertedField>> -
Constructor Summary
ConstructorDescriptionCustomConverterRegistry
(List<CustomConverter<org.apache.kafka.connect.data.SchemaBuilder, ConvertedField>> converters) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
fullColumnName
(TableId table, Column column) getValueConverter
(TableId table, Column column) Obtain a pre-registered converter for a given column.boolean
isEmpty()
Optional<org.apache.kafka.connect.data.SchemaBuilder>
registerConverterFor
(TableId table, Column column, Object defaultValue) Create and register a converter for a given database column.
-
Field Details
-
converters
@Immutable private final List<CustomConverter<org.apache.kafka.connect.data.SchemaBuilder,ConvertedField>> converters -
conversionFunctionMap
private final Map<String,CustomConverterRegistry.ConverterDefinition<org.apache.kafka.connect.data.SchemaBuilder>> conversionFunctionMap
-
-
Constructor Details
-
CustomConverterRegistry
public CustomConverterRegistry(List<CustomConverter<org.apache.kafka.connect.data.SchemaBuilder, 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 columncolumn
- the column metadata- Returns:
- the schema of the value generated by the converter or empty if converter does not support the column
-
getValueConverter
Obtain a pre-registered converter for a given column.- Parameters:
table
- the table that contains the columncolumn
- 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
-