
io.zeebe.protocol.record.PartitionRole Maven / Gradle / Ivy
/* Generated SBE (Simple Binary Encoding) message codec. */
package io.zeebe.protocol.record;
public enum PartitionRole
{
LEADER((short)0),
FOLLOWER((short)1),
INACTIVE((short)2),
/**
* To be used to represent a not known value from a later version.
*/
SBE_UNKNOWN((short)255),
/**
* To be used to represent not present or null.
*/
NULL_VAL((short)255);
private final short value;
PartitionRole(final short value)
{
this.value = value;
}
public short value()
{
return value;
}
public static PartitionRole get(final short value)
{
switch (value)
{
case 0: return LEADER;
case 1: return FOLLOWER;
case 2: return INACTIVE;
case 255: return NULL_VAL;
}
return SBE_UNKNOWN;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy