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

uk.co.real_logic.artio.messages.ReplayMessagesStatus Maven / Gradle / Ivy

/* Generated SBE (Simple Binary Encoding) message codec. */
package uk.co.real_logic.artio.messages;

@SuppressWarnings("all")
public enum ReplayMessagesStatus
{

    /**
     * Operation Succeeded
     */
    OK((short)0),


    /**
     * Either your library doesn't own this session or the gateway doesn't know about the specified session
     */
    SESSION_NOT_OWNED((short)1),


    /**
     * The gateway doesn't know about your library
     */
    UNKNOWN_LIBRARY((short)2),


    /**
     * Can't replay to that sequence number: haven't archived it yet
     */
    SEQUENCE_NUMBER_TOO_HIGH((short)4),


    /**
     * We can't find the required number of messages in the log
     */
    MISSING_MESSAGES((short)5),


    /**
     * You've requested replay of messages, but EngineConfiguration has disabled required logging of messsages
     */
    INVALID_CONFIGURATION_NOT_LOGGING_MESSAGES((short)6),

    /**
     * To be used to represent not present or null.
     */
    NULL_VAL((short)255);

    private final short value;

    ReplayMessagesStatus(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 ReplayMessagesStatus get(final short value)
    {
        switch (value)
        {
            case 0: return OK;
            case 1: return SESSION_NOT_OWNED;
            case 2: return UNKNOWN_LIBRARY;
            case 4: return SEQUENCE_NUMBER_TOO_HIGH;
            case 5: return MISSING_MESSAGES;
            case 6: return INVALID_CONFIGURATION_NOT_LOGGING_MESSAGES;
            case 255: return NULL_VAL;
        }

        throw new IllegalArgumentException("Unknown value: " + value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy