Class TopicsConfig.TopicConfig

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    TopicsConfig

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

      Constructors 
      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

        @Nullable
        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.
        Parameters:
        partition - the number of partition
        offset - the initial offset for the partition
      • toString

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