Enum ScriptOutputType

  • All Implemented Interfaces:
    Serializable, Comparable<ScriptOutputType>

    public enum ScriptOutputType
    extends Enum<ScriptOutputType>
    A Lua script returns one of the following types: Redis to Lua conversion table.
    • Redis integer reply -> Lua number
    • Redis bulk reply -> Lua string
    • Redis multi bulk reply -> Lua table (may have other Redis data types nested)
    • Redis status reply -> Lua table with a single ok field containing the status
    • Redis error reply -> Lua table with a single err field containing the error
    • Redis Nil bulk reply and Nil multi bulk reply -> Lua false boolean type
    Lua to Redis conversion table.
    • Lua number -> Redis integer reply (the number is converted into an integer)
    • Lua string -> Redis bulk reply
    • Lua table (array) -> Redis multi bulk reply (truncated to the first null inside the Lua array if any)
    • Lua table with a single ok field -> Redis status reply
    • Lua table with a single err field -> Redis error reply
    • Lua boolean false -> Redis Nil bulk reply.
    Author:
    Will Glozer
    • Method Detail

      • values

        public static ScriptOutputType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ScriptOutputType c : ScriptOutputType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

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