Class MariaDbCharsetRegistry
java.lang.Object
io.debezium.connector.mariadb.charset.MariaDbCharsetRegistry
- All Implemented Interfaces:
BinlogCharsetRegistry,io.debezium.service.Service
A registry that stores character set mappings from
charset_mappings.json for MariaDB.- Author:
- Chris Cranford
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classRepresents a character set mappingprivate static classRepresents the data within the filecharset_mappings.json.private static classRepresents a collation mapping to a set of database character sets. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String,MariaDbCharsetRegistry.CharacterSetMapping> private static final Stringprivate final Map<Integer,MariaDbCharsetRegistry.CharacterSetMapping> private static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetCharsetNameForCollationIndex(Integer collationIndex) getCollationNameForCollationIndex(Integer collationIndex) getJavaEncodingForCharSet(String characterSetName) private static booleanisWithinRange(int value) private voidloadCharacterSetMappings(List<MariaDbCharsetRegistry.CharacterSetMapping> characterSetMappings) private voidprivate voidloadCollationMappings(List<MariaDbCharsetRegistry.CollationMapping> collationMappings)
-
Field Details
-
CHARSET_MAPPINGS
- See Also:
-
MAP_SIZE
private static final int MAP_SIZE- See Also:
-
collationIndexToCollationName
-
collationIndexToCharacterSet
-
characterSetNameToCharacterSet
-
-
Constructor Details
-
MariaDbCharsetRegistry
public MariaDbCharsetRegistry()
-
-
Method Details
-
getCharsetMapSize
public int getCharsetMapSize()- Specified by:
getCharsetMapSizein interfaceBinlogCharsetRegistry
-
getCollationNameForCollationIndex
- Specified by:
getCollationNameForCollationIndexin interfaceBinlogCharsetRegistry
-
getCharsetNameForCollationIndex
- Specified by:
getCharsetNameForCollationIndexin interfaceBinlogCharsetRegistry
-
getJavaEncodingForCharSet
- Specified by:
getJavaEncodingForCharSetin interfaceBinlogCharsetRegistry
-
loadCharacterSetMappingsFromFileResource
private void loadCharacterSetMappingsFromFileResource() -
loadCharacterSetMappings
private void loadCharacterSetMappings(List<MariaDbCharsetRegistry.CharacterSetMapping> characterSetMappings) -
loadCollationMappings
-
isWithinRange
private static boolean isWithinRange(int value)
-