Package io.confluent.license.util
Class LicenseTopicAdmin.NewTopicBuilder
java.lang.Object
io.confluent.license.util.LicenseTopicAdmin.NewTopicBuilder
- Enclosing class:
LicenseTopicAdmin
A builder of
NewTopic instances.-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kafka.clients.admin.NewTopicbuild()Build theNewTopicrepresentation.Specify that the topic should be compacted.Specify the configuration properties for the topic, overwriting any previously-set properties.Specify the topic's number of partition should be the broker configuration fornum.partitions.Specify the replication factor for the topic should be the broker configurations fordefault.replication.factor.minInSyncReplicas(short minInSyncReplicas) Specify the minimum number of in-sync replicas required for this topic.partitions(int numPartitions) Specify the desired number of partitions for the topic.replicationFactor(short replicationFactor) Specify the desired replication factor for the topic.
-
Method Details
-
partitions
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
Specify the topic's number of partition should be the broker configuration fornum.partitions.- Returns:
- this builder to allow methods to be chained; never null
-
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
Specify the replication factor for the topic should be the broker configurations fordefault.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
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 theNewTopicrepresentation.- Returns:
- the topic description; never null
-