All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.zeebe.clustering.management.ErrorResponseCode Maven / Gradle / Ivy

/* Generated SBE (Simple Binary Encoding) message codec. */
package io.zeebe.clustering.management;

public enum ErrorResponseCode
{
    PARTITION_NOT_FOUND((short)0),

    INVALID_PARAMETERS((short)1),

    READ_ERROR((short)2),

    /**
     * To be used to represent a unknown 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;

    ErrorResponseCode(final short value)
    {
        this.value = value;
    }

    /**
     * The raw encoded value in the Java type representation.
     *
     * @return the raw value encoded.
     */
    public short value()
    {
        return value;
    }

    /**
     * Lookup the enum value representing the value.
     *
     * @param value encoded to be looked up.
     * @return the enum value representing the value.
     */
    public static ErrorResponseCode get(final short value)
    {
        switch (value)
        {
            case 0: return PARTITION_NOT_FOUND;
            case 1: return INVALID_PARAMETERS;
            case 2: return READ_ERROR;
            case 255: return NULL_VAL;
        }

        return SBE_UNKNOWN;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy