Data serialization
Data serialization is extensively used by Redisson to marshall and unmarshall bytes received or sent over network link with Redis or Valkey server. Many popular codecs are available for usage:
Codec class name | Description |
---|---|
org.redisson.codec.Kryo5Codec |
Kryo 5 binary codec (Android compatible) Default codec |
org.redisson.codec.KryoCodec |
Kryo 4 binary codec |
org.redisson.codec.JsonJacksonCodec |
Jackson JSON codec. Stores type information in @class field(Android compatible) |
org.redisson.codec.TypedJsonJacksonCodec |
Jackson JSON codec which doesn't store type id (@class field) |
org.redisson.codec.AvroJacksonCodec |
Avro binary json codec |
org.redisson.codec.ProtobufCodec |
Protobuf codec |
org.redisson.codec.FuryCodec |
Apache Fury codec |
org.redisson.codec.SmileJacksonCodec |
Smile binary json codec |
org.redisson.codec.CborJacksonCodec |
CBOR binary json codec |
org.redisson.codec.MsgPackJacksonCodec |
MsgPack binary json codec |
org.redisson.codec.IonJacksonCodec |
Amazon Ion codec |
org.redisson.codec.SerializationCodec |
JDK Serialization binary codec (Android compatible) |
org.redisson.codec.ZStdCodec |
ZStandard compression codec. Uses Kryo5Codec for serialization by default |
org.redisson.codec.LZ4Codec |
LZ4 compression codec. Uses Kryo5Codec for serialization by default |
org.redisson.codec.LZ4CodecV2 |
LZ4 Apache Commons compression codec. Uses Kryo5Codec for serialization by default |
org.redisson.codec.SnappyCodecV2 |
Snappy compression codec based on snappy-java project. Uses Kryo5Codec for serialization by default |
org.redisson.client.codec.StringCodec |
String codec |
org.redisson.client.codec.LongCodec |
Long codec |
org.redisson.client.codec.ByteArrayCodec |
Byte array codec |
org.redisson.codec.CompositeCodec |
Allows to mix different codecs as one |