I - The type of DataCollectionId used by a given implementationpublic class TopicSelector<I extends DataCollectionId> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
TopicSelector.DataCollectionTopicNamer<I extends DataCollectionId>
Implementations determine the topic name corresponding to a given data collection.
|
private static class |
TopicSelector.TopicNameCache<I extends DataCollectionId>
A topic namer that caches names it has obtained from a delegate.
|
private static class |
TopicSelector.TopicNameSanitizer<I extends DataCollectionId>
A topic namer that replaces any characters invalid in a topic name with
_. |
| Modifier and Type | Field and Description |
|---|---|
private TopicSelector.DataCollectionTopicNamer<I> |
dataCollectionTopicNamer |
private String |
delimiter |
private String |
heartbeatPrefix |
private String |
prefix |
| Modifier | Constructor and Description |
|---|---|
private |
TopicSelector(String prefix,
String heartbeatPrefix,
String delimiter,
TopicSelector.DataCollectionTopicNamer<I> dataCollectionTopicNamer) |
| Modifier and Type | Method and Description |
|---|---|
static <I extends DataCollectionId> |
defaultSelector(CommonConnectorConfig connectorConfig,
TopicSelector.DataCollectionTopicNamer<I> dataCollectionTopicNamer) |
static <I extends DataCollectionId> |
defaultSelector(String prefix,
String heartbeatPrefix,
String delimiter,
TopicSelector.DataCollectionTopicNamer<I> dataCollectionTopicNamer) |
String |
getHeartbeatTopic()
Get the name of the heartbeat topic for the given server.
|
String |
getPrimaryTopic()
Get the name of the primary topic.
|
String |
topicNameFor(I id)
Returns the name of the Kafka topic for a given data collection identifier
|
private final String prefix
private final String heartbeatPrefix
private final String delimiter
private final TopicSelector.DataCollectionTopicNamer<I extends DataCollectionId> dataCollectionTopicNamer
private TopicSelector(String prefix, String heartbeatPrefix, String delimiter, TopicSelector.DataCollectionTopicNamer<I> dataCollectionTopicNamer)
public static <I extends DataCollectionId> TopicSelector<I> defaultSelector(String prefix, String heartbeatPrefix, String delimiter, TopicSelector.DataCollectionTopicNamer<I> dataCollectionTopicNamer)
public static <I extends DataCollectionId> TopicSelector<I> defaultSelector(CommonConnectorConfig connectorConfig, TopicSelector.DataCollectionTopicNamer<I> dataCollectionTopicNamer)
public String topicNameFor(I id)
id - the data collection identifier, never nullnullpublic String getPrimaryTopic()
public String getHeartbeatTopic()
<prefix>-heartbeat".Copyright © 2020 JBoss by Red Hat. All rights reserved.