public class TopicsConfig extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
TopicsConfig.TopicConfig
Contains the configuration for a single Kafka topic.
|
Constructor and Description |
---|
TopicsConfig() |
Modifier and Type | Method and Description |
---|---|
TopicsConfig |
addTopic(String topicName)
Creates empty topic configuration and saves it
in the map under the topic name.
|
TopicsConfig |
addTopicConfig(TopicsConfig.TopicConfig config)
Adds the topic configuration.
|
TopicsConfig |
addTopics(List<String> topicNames)
Creates new topic configurations for every
provided topic from the list and saves them in the map.
|
Long |
getInitialOffsetFor(String topicName,
int partition)
Returns initial offset value for the given topic and partition combination.
|
TopicsConfig.TopicConfig |
getTopicConfig(String topicName)
Returns the topic configuration for given
topic.
|
Map<String,TopicsConfig.TopicConfig> |
getTopicConfigs()
Returns the map of topic configurations,
mapped by topic name.
|
Set<String> |
getTopicNames()
Returns the set of topic names from topic
configurations.
|
String |
toString() |
public Map<String,TopicsConfig.TopicConfig> getTopicConfigs()
public Set<String> getTopicNames()
addTopicConfig(TopicConfig)
or addTopic(String)
@Nullable public TopicsConfig.TopicConfig getTopicConfig(String topicName)
public TopicsConfig addTopicConfig(TopicsConfig.TopicConfig config)
public TopicsConfig addTopic(String topicName)
public TopicsConfig addTopics(List<String> topicNames)
@Nullable public Long getInitialOffsetFor(String topicName, int partition)
null
is returned.Copyright © 2023 Hazelcast, Inc.. All rights reserved.