Class Codecs.IntegerCodec

java.lang.Object
io.quarkus.redis.datasource.codecs.Codecs.IntegerCodec
All Implemented Interfaces:
Codec
Enclosing class:
Codecs

public static class Codecs.IntegerCodec extends Object implements Codec
  • Field Details

  • Method Details

    • canHandle

      public boolean canHandle(Type clazz)
      Description copied from interface: Codec
      Checks if the current codec can handle the serialization and deserialization of object from the given type.
      Specified by:
      canHandle in interface Codec
      Parameters:
      clazz - the type, cannot be null
      Returns:
      true if the codec can handle the type, false otherwise
    • encode

      public byte[] encode(Object item)
      Description copied from interface: Codec
      Encodes the given object. The type of the given object matches the type used to call the Codec.canHandle(Type) method.
      Specified by:
      encode in interface Codec
      Parameters:
      item - the item
      Returns:
      the encoded content
    • decode

      public Integer decode(byte[] item)
      Description copied from interface: Codec
      Decodes the given bytes to an object. The codec must return an instance of the type used to call the Codec.canHandle(Type) method.
      Specified by:
      decode in interface Codec
      Parameters:
      item - the bytes
      Returns:
      the object