Enum Class BrokerComponent

java.lang.Object
java.lang.Enum<BrokerComponent>
org.apache.kafka.clients.admin.BrokerComponent
All Implemented Interfaces:
Serializable, Comparable<BrokerComponent>, Constable

public enum BrokerComponent extends Enum<BrokerComponent>
  • Enum Constant Details

  • Method Details

    • values

      public static BrokerComponent[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BrokerComponent valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • id

      public byte id()
    • isDowngradeAllowed

      public boolean isDowngradeAllowed()
      Returns whether downgrading from this component to UNSPECIFIED is supported.
    • minSupportedVersion

      public int minSupportedVersion()
      Returns the minimum Broker Health API version at which this component code is supported.
    • maybeDowngrade

      public BrokerComponent maybeDowngrade(short version)
      Given a Broker Health API version, checks if this component code is invalid and if it is eligible for downgrade, convert to BrokerComponent.UNSPECIFIED.
    • isValid

      public boolean isValid(short version)
    • forId

      public static BrokerComponent forId(byte id)
    • forString

      public static BrokerComponent forString(String str)