Package io.debezium.spi.common
Interface ReplacementFunction
Function used to determine the replacement for a character that is not valid per Avro rules.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanisValidFirstCharacter(char c) Determine if the supplied character is a valid first character for Avro fullnames.default booleanisValidNonFirstCharacter(char c) Determine if the supplied character is a valid non-first character for Avro fullnames.replace(char invalid) Determine the replacement string for the invalid character.
-
Field Details
-
REPLACEMENT_CHAR
- See Also:
-
UNDERSCORE_REPLACEMENT
-
-
Method Details
-
replace
Determine the replacement string for the invalid character.- Parameters:
invalid- the invalid character- Returns:
- the replacement string; may not be null
-
isValidFirstCharacter
default boolean isValidFirstCharacter(char c) Determine if the supplied character is a valid first character for Avro fullnames. Default legal characters are [a-zA-Z_] for the first character.- Parameters:
c- the character- Returns:
trueif the character is a valid first character of an Avro fullname, orfalseotherwise
-
isValidNonFirstCharacter
default boolean isValidNonFirstCharacter(char c) Determine if the supplied character is a valid non-first character for Avro fullnames. Default legal characters are [a-zA-Z0-9_.] for the non-first character.- Parameters:
c- the character- Returns:
trueif the character is a valid non-first character of an Avro fullname, orfalseotherwise
-