Enum Class Resp3Type

java.lang.Object
java.lang.Enum<Resp3Type>
org.infinispan.server.resp.serialization.Resp3Type
All Implemented Interfaces:
Serializable, Comparable<Resp3Type>, Constable, SerializationHint, SerializationHint.SimpleHint

public enum Resp3Type extends Enum<Resp3Type> implements SerializationHint.SimpleHint
Identifies the RESP3 type correspondent of a Java object.

This enumeration includes a subset of the types available in RESP3, including unknown types. The types help to identify the RESP3 correspondent type for nested data structures, such as lists and maps. The hints only work for 1-level nested objects. Deeply nested or heterogeneous structures utilize an unknown hint and search the registry for a match.

The type only covers the primitive types in RESP. We do not include nested objects here. If a nested object is needed, utilize the appropriate method in ResponseWriter and provide a JavaObjectSerializer to serialize.

Author:
José Bolina
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static Resp3Type[] 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 Resp3Type 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
    • serialize

      public abstract void serialize(Object object, ResponseWriter writer)
      Delegates the serialization to a specific method.

      This approach avoids introspecting all the registered serializes in the system. In the worst case, it defaults to the unknown approach, and traverse the complete serializer list.

      Specified by:
      serialize in interface SerializationHint.SimpleHint
      Parameters:
      object - The element to serialize.
      writer - The allocator to utilize.