Class ConsumerPartitionAssignor.Assignment
java.lang.Object
org.apache.kafka.clients.consumer.ConsumerPartitionAssignor.Assignment
- Enclosing interface:
ConsumerPartitionAssignor
Represents the partition assignment for a consumer.
-
Constructor Summary
ConstructorsConstructorDescriptionAssignment(List<TopicPartition> partitions) Constructs an assignment with only partitions.Assignment(List<TopicPartition> partitions, ByteBuffer userData) Constructs an assignment with partitions and user data. -
Method Summary
-
Constructor Details
-
Assignment
Constructs an assignment with partitions and user data.- Parameters:
partitions- The list of partitions assigned to the consumeruserData- Nullable user data to include in the assignment
-
Assignment
Constructs an assignment with only partitions.- Parameters:
partitions- The list of partitions assigned to the consumer
-
-
Method Details
-
partitions
Returns the list of partitions assigned to the consumer.- Returns:
- The list of partitions
-
userData
Returns the user data included in the assignment.- Returns:
- The user data, or null if none was provided
-
toString
-