Package io.debezium.schema
Class TopicSelector.TopicNameSanitizer<I extends DataCollectionId>
- java.lang.Object
-
- io.debezium.schema.TopicSelector.TopicNameSanitizer<I>
-
- All Implemented Interfaces:
TopicSelector.DataCollectionTopicNamer<I>
- Enclosing class:
- TopicSelector<I extends DataCollectionId>
private static class TopicSelector.TopicNameSanitizer<I extends DataCollectionId> extends Object implements TopicSelector.DataCollectionTopicNamer<I>
A topic namer that replaces any characters invalid in a topic name with_.
-
-
Field Summary
Fields Modifier and Type Field Description private TopicSelector.DataCollectionTopicNamer<I>delegateprivate static org.slf4j.LoggerLOGGERprivate static StringREPLACEMENT_CHAR
-
Constructor Summary
Constructors Constructor Description TopicNameSanitizer(TopicSelector.DataCollectionTopicNamer<I> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanisValidTopicNameCharacter(char c)Whether the given character is a legal character of a Kafka topic name.StringtopicNameFor(I id, String prefix, String delimiter)
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
REPLACEMENT_CHAR
private static final String REPLACEMENT_CHAR
- See Also:
- Constant Field Values
-
delegate
private final TopicSelector.DataCollectionTopicNamer<I extends DataCollectionId> delegate
-
-
Constructor Detail
-
TopicNameSanitizer
public TopicNameSanitizer(TopicSelector.DataCollectionTopicNamer<I> delegate)
-
-
Method Detail
-
topicNameFor
public String topicNameFor(I id, String prefix, String delimiter)
- Specified by:
topicNameForin interfaceTopicSelector.DataCollectionTopicNamer<I extends DataCollectionId>
-
isValidTopicNameCharacter
private boolean isValidTopicNameCharacter(char c)
Whether the given character is a legal character of a Kafka topic name. Legal characters are[a-zA-Z0-9._-].
-
-