Package io.strimzi.test.container
Enum KafkaNodeRole
- All Implemented Interfaces:
Serializable,Comparable<KafkaNodeRole>
Internal: Enum representing the different roles a Kafka node can have in KRaft mode.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBroker-only node that handles client requests and stores topic data but does not participate in the metadata quorum.Combined node that acts as both broker and controller.Controller-only node that participates in the metadata quorum but does not handle client requests or store topic data. -
Method Summary
Modifier and TypeMethodDescriptionReturns the Kafka process.roles configuration value for this node role.booleanisBroker()Checks if this node role includes broker functionality.booleanChecks if this node role includes controller functionality.static KafkaNodeRoleReturns the enum constant of this type with the specified name.static KafkaNodeRole[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
COMBINED
Combined node that acts as both broker and controller. This is the default behavior and maintains backward compatibility. -
CONTROLLER
Controller-only node that participates in the metadata quorum but does not handle client requests or store topic data. -
BROKER
Broker-only node that handles client requests and stores topic data but does not participate in the metadata quorum.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getProcessRoles
Returns the Kafka process.roles configuration value for this node role.- Returns:
- the process.roles configuration string
-
isController
public boolean isController()Checks if this node role includes controller functionality.- Returns:
- true if the node can act as a controller, false otherwise
-
isBroker
public boolean isBroker()Checks if this node role includes broker functionality.- Returns:
- true if the node can act as a broker, false otherwise
-