Class LicenseTopicAdmin.NewTopicBuilder

java.lang.Object
io.confluent.license.util.LicenseTopicAdmin.NewTopicBuilder
Enclosing class:
LicenseTopicAdmin

public static class LicenseTopicAdmin.NewTopicBuilder extends Object
A builder of NewTopic instances.
  • Method Details

    • partitions

      public LicenseTopicAdmin.NewTopicBuilder partitions(int numPartitions)
      Specify the desired number of partitions for the topic.
      Parameters:
      numPartitions - the desired number of partitions; must be positive, or -1 to signify using the broker's default
      Returns:
      this builder to allow methods to be chained; never null
    • defaultPartitions

      public LicenseTopicAdmin.NewTopicBuilder defaultPartitions()
      Specify the topic's number of partition should be the broker configuration for num.partitions.
      Returns:
      this builder to allow methods to be chained; never null
    • replicationFactor

      public LicenseTopicAdmin.NewTopicBuilder replicationFactor(short replicationFactor)
      Specify the desired replication factor for the topic.
      Parameters:
      replicationFactor - the desired replication factor; must be positive, or -1 to signify using the broker's default
      Returns:
      this builder to allow methods to be chained; never null
    • defaultReplicationFactor

      public LicenseTopicAdmin.NewTopicBuilder defaultReplicationFactor()
      Specify the replication factor for the topic should be the broker configurations for default.replication.factor.
      Returns:
      this builder to allow methods to be chained; never null
    • compacted

      Specify that the topic should be compacted.
      Returns:
      this builder to allow methods to be chained; never null
    • minInSyncReplicas

      public LicenseTopicAdmin.NewTopicBuilder minInSyncReplicas(short minInSyncReplicas)
      Specify the minimum number of in-sync replicas required for this topic.
      Parameters:
      minInSyncReplicas - the minimum number of in-sync replicas allowed for the topic; must be positive
      Returns:
      this builder to allow methods to be chained; never null
    • config

      Specify the configuration properties for the topic, overwriting any previously-set properties.
      Parameters:
      configs - the desired topic configuration properties, or null if all existing properties should be cleared
      Returns:
      this builder to allow methods to be chained; never null
    • build

      public org.apache.kafka.clients.admin.NewTopic build()
      Build the NewTopic representation.
      Returns:
      the topic description; never null