Class TopicsConfig.TopicConfig

  • All Implemented Interfaces:
    Enclosing class:

    public static class TopicsConfig.TopicConfig
    extends java.lang.Object
    Contains the configuration for a single Kafka topic.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructor Description
      TopicConfig​(java.lang.String topicName)
      Creates new topic configuration for given topic name.
    • Constructor Detail

      • TopicConfig

        public TopicConfig​(@Nonnull
                           java.lang.String topicName)
        Creates new topic configuration for given topic name.
    • Method Detail

      • getTopicName

        public java.lang.String getTopicName()
        Returns the name of the topic.
      • getPartitionsInitialOffsets

        public java.util.Map<java.lang.Integer,​java.lang.Long> getPartitionsInitialOffsets()
        Returns partitions initial offsets map.
      • getPartitionInitialOffset

        public java.lang.Long getPartitionInitialOffset​(int partition)
        Returns the initial offset for given partition or null if it was not defined.
      • addPartitionInitialOffset

        public TopicsConfig.TopicConfig addPartitionInitialOffset​(int partition,
                                                                  long offset)
        Adds the initial offset for given partition to the configuration.
        partition - the number of partition
        offset - the initial offset for the partition
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object