Enum Class ReturnType

java.lang.Object
java.lang.Enum<ReturnType>
org.springframework.data.redis.connection.ReturnType
All Implemented Interfaces:
Serializable, Comparable<ReturnType>, Constable

public enum ReturnType extends Enum<ReturnType>
Represents a data type returned from Redis, currently used to denote the expected return type of Redis scripting commands
Author:
Jennifer Hickey, Christoph Strobl, Mark Paluch
  • Enum Constant Details

    • BOOLEAN

      public static final ReturnType BOOLEAN
      Returned as Boolean
    • INTEGER

      public static final ReturnType INTEGER
      Returned as Long
    • MULTI

      public static final ReturnType MULTI
      Returned as List<Object>
    • STATUS

      public static final ReturnType STATUS
      Returned as byte[]
    • VALUE

      public static final ReturnType VALUE
      Returned as byte[]
  • Method Details

    • values

      public static ReturnType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

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

      public static ReturnType fromJavaType(@Nullable Class<?> javaType)
      Parameters:
      javaType - can be null which translates to STATUS.
      Returns:
      never null.