Class NewTopic
java.lang.Object
io.vertx.kafka.admin.NewTopic
A new topic to be created
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()intshortSet the configuration for the new topic or null if no configs ever specifiedSet the name of the topic to be createdsetNumPartitions(int numPartitions) Set the number of partitions for the new topic or -1 if a replica assignment has been specifiedsetReplicasAssignments(Map<Integer, List<Integer>> replicasAssignments) Set a map from partition id to replica idssetReplicationFactor(short replicationFactor) Set the replication factor for the new topic or -1 if a replica assignment has been specifiedtoJson()Convert object to JSON representationtoString()
-
Constructor Details
-
NewTopic
public NewTopic()Constructor -
NewTopic
Constructor- Parameters:
name- the topic namenumPartitions- number of partitionsreplicationFactor- replication factor
-
NewTopic
-
NewTopic
Constructor (from JSON representation)- Parameters:
json- JSON representation
-
-
Method Details
-
getName
- Returns:
- the name of the topic to be created
-
setName
-
getNumPartitions
public int getNumPartitions()- Returns:
- the number of partitions for the new topic or -1 if a replica assignment has been specified
-
setNumPartitions
Set the number of partitions for the new topic or -1 if a replica assignment has been specified- Parameters:
numPartitions- the number of partitions for the new topic or -1 if a replica assignment has been specified- Returns:
- current instance of the class to be fluent
-
getReplicationFactor
public short getReplicationFactor()- Returns:
- the replication factor for the new topic or -1 if a replica assignment has been specified
-
setReplicationFactor
Set the replication factor for the new topic or -1 if a replica assignment has been specified- Parameters:
replicationFactor- the replication factor for the new topic or -1 if a replica assignment has been specified- Returns:
- current instance of the class to be fluent
-
getReplicasAssignments
-
setReplicasAssignments
-
getConfig
-
setConfig
-
toJson
-
toString
-