Package io.vertx.kafka.admin
Class NewPartitions
- java.lang.Object
-
- io.vertx.kafka.admin.NewPartitions
-
public class NewPartitions extends Object
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
Constructors Constructor Description NewPartitions()
ConstructorNewPartitions(int totalCount, List<List<Integer>> newAssignments)
ConstructorNewPartitions(JsonObject json)
Constructor (from JSON representation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<List<Integer>>
getNewAssignments()
int
getTotalCount()
void
NewPartitions(int totalCount)
ConstructorNewPartitions
setNewAssignments(List<List<Integer>> assignments)
Set the assignment for the new partitionsNewPartitions
setTotalCount(int totalCount)
Set the number of partitions for the topicJsonObject
toJson()
Convert object to JSON representationString
toString()
-
-
-
Constructor Detail
-
NewPartitions
public NewPartitions()
Constructor
-
NewPartitions
public NewPartitions(int totalCount, List<List<Integer>> newAssignments)
Constructor- Parameters:
totalCount
- total count of partitionsnewAssignments
- assignment to the brokers
-
NewPartitions
public NewPartitions(JsonObject json)
Constructor (from JSON representation)- Parameters:
json
- JSON representation
-
-
Method Detail
-
NewPartitions
public void NewPartitions(int totalCount)
Constructor- Parameters:
totalCount
- total count of partitions
-
setTotalCount
public NewPartitions setTotalCount(int totalCount)
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
public NewPartitions setNewAssignments(List<List<Integer>> assignments)
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
public List<List<Integer>> getNewAssignments()
- Returns:
- assignment of partitions to the brokers
-
toJson
public JsonObject toJson()
Convert object to JSON representation- Returns:
- JSON representation
-
-