public enum BrokerComponent extends Enum<BrokerComponent>
Enum Constant and Description |
---|
EXTERNAL_CONNECTIVITY_STARTUP |
NETWORK |
STORAGE |
UNKNOWN |
UNSPECIFIED |
Modifier and Type | Method and Description |
---|---|
static BrokerComponent |
forId(byte id) |
static BrokerComponent |
forString(String str) |
byte |
id() |
boolean |
isDowngradeAllowed()
Returns whether downgrading from this component to UNSPECIFIED
is supported.
|
boolean |
isValid(short version) |
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.
|
int |
minSupportedVersion()
Returns the minimum Broker Health API version at which this
component code is supported.
|
static BrokerComponent |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BrokerComponent[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BrokerComponent UNKNOWN
public static final BrokerComponent UNSPECIFIED
public static final BrokerComponent STORAGE
public static final BrokerComponent NETWORK
public static final BrokerComponent EXTERNAL_CONNECTIVITY_STARTUP
public static BrokerComponent[] values()
for (BrokerComponent c : BrokerComponent.values()) System.out.println(c);
public static BrokerComponent valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic byte id()
public boolean isDowngradeAllowed()
public int minSupportedVersion()
public BrokerComponent maybeDowngrade(short version)
public boolean isValid(short version)
public static BrokerComponent forId(byte id)
public static BrokerComponent forString(String str)