- All Implemented Interfaces:
Serializable,Comparable<ScriptOutputType>,java.lang.constant.Constable
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
okfield containing the status - Redis error reply -> Lua table with a single
errfield containing the error - Redis Nil bulk reply and Nil multi bulk reply -> Lua false boolean type
- 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
nullinside the Lua array if any) - Lua table with a single
okfield -> Redis status reply - Lua table with a single
errfield -> Redis error reply - Lua boolean false -> Redis Nil bulk reply.
- Author:
- Will Glozer
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description static ScriptOutputTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ScriptOutputType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BOOLEAN
-
INTEGER
-
MULTI
-
STATUS
-
VALUE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException- if the argument is null
-