Package io.vertx.kafka.admin
Class NewPartitions
java.lang.Object
io.vertx.kafka.admin.NewPartitions
An update to the number of partitions including assignment.
Partitions can be increased only. If decrease, an exception from Kafka broker is received.
If no assignment is specifies brokers will randomly assign the partitions.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorNewPartitions(int totalCount, List<List<Integer>> newAssignments) ConstructorNewPartitions(JsonObject json) Constructor (from JSON representation) -
Method Summary
Modifier and TypeMethodDescriptionintvoidNewPartitions(int totalCount) ConstructorsetNewAssignments(List<List<Integer>> assignments) Set the assignment for the new partitionssetTotalCount(int totalCount) Set the number of partitions for the topictoJson()Convert object to JSON representationtoString()
-
Constructor Details
-
NewPartitions
public NewPartitions()Constructor -
NewPartitions
Constructor- Parameters:
totalCount- total count of partitionsnewAssignments- assignment to the brokers
-
NewPartitions
Constructor (from JSON representation)- Parameters:
json- JSON representation
-
-
Method Details
-
NewPartitions
public void NewPartitions(int totalCount) Constructor- Parameters:
totalCount- total count of partitions
-
setTotalCount
Set the number of partitions for the topic- Parameters:
totalCount- the number of partitions for the topic- Returns:
- current instance of the class to be fluent
-
setNewAssignments
Set the assignment for the new partitions- Parameters:
assignments- assignments of the partitions to the brokers- Returns:
- current instance of the class to be fluent
-
getTotalCount
public int getTotalCount()- Returns:
- number of total partitions
-
getNewAssignments
- Returns:
- assignment of partitions to the brokers
-
toJson
Convert object to JSON representation- Returns:
- JSON representation
-
toString
-