Package org.redisson.codec
Class TypedJsonJacksonCodec
- java.lang.Object
-
- org.redisson.client.codec.BaseCodec
-
- org.redisson.codec.JsonJacksonCodec
-
- org.redisson.codec.TypedJsonJacksonCodec
-
- All Implemented Interfaces:
Codec
public class TypedJsonJacksonCodec extends JsonJacksonCodec
Json Jackson Type codec. Doesn't include `@class` field during data encoding, and doesn't require it for data decoding.- Author:
- Nikita Koksharov, Andrej Kazakov
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.redisson.codec.JsonJacksonCodec
JsonJacksonCodec.ThrowableMixIn
-
-
Field Summary
-
Fields inherited from class org.redisson.codec.JsonJacksonCodec
INSTANCE, mapObjectMapper
-
Fields inherited from class org.redisson.client.codec.BaseCodec
SKIPPED_CODECS
-
-
Constructor Summary
Constructors Constructor Description TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeReference)
TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> mapKeyTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapValueTypeReference)
TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapKeyTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapValueTypeReference)
TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapKeyTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapValueTypeReference, com.fasterxml.jackson.databind.ObjectMapper mapper)
TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> mapKeyTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapValueTypeReference, com.fasterxml.jackson.databind.ObjectMapper mapper)
TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeReference, com.fasterxml.jackson.databind.ObjectMapper mapper)
TypedJsonJacksonCodec(Class<?> valueClass)
TypedJsonJacksonCodec(Class<?> valueClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
TypedJsonJacksonCodec(Class<?> mapKeyClass, Class<?> mapValueClass)
TypedJsonJacksonCodec(Class<?> mapKeyClass, Class<?> mapValueClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
TypedJsonJacksonCodec(Class<?> valueClass, Class<?> mapKeyClass, Class<?> mapValueClass)
TypedJsonJacksonCodec(Class<?> valueClass, Class<?> mapKeyClass, Class<?> mapValueClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
TypedJsonJacksonCodec(ClassLoader classLoader, TypedJsonJacksonCodec codec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Decoder<Object>
getMapKeyDecoder()
Returns object decoder used for hash map keys in HMAP Redis structureEncoder
getMapKeyEncoder()
Returns object encoder used for hash map keys in HMAP Redis structureDecoder<Object>
getMapValueDecoder()
Returns object decoder used for hash map values in HMAP Redis structureEncoder
getMapValueEncoder()
Returns object encoder used for hash map values in HMAP Redis structureDecoder<Object>
getValueDecoder()
Returns object decoder used for any objects stored Redis structure except HMAPEncoder
getValueEncoder()
Returns object encoder used for any objects stored Redis structure except HMAPprotected void
initTypeInclusion(com.fasterxml.jackson.databind.ObjectMapper mapObjectMapper)
-
Methods inherited from class org.redisson.codec.JsonJacksonCodec
createObjectMapper, getClassLoader, getObjectMapper, init
-
-
-
-
Constructor Detail
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(Class<?> valueClass)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(Class<?> valueClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(Class<?> mapKeyClass, Class<?> mapValueClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(Class<?> valueClass, Class<?> mapKeyClass, Class<?> mapValueClass)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(Class<?> valueClass, Class<?> mapKeyClass, Class<?> mapValueClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeReference)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeReference, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> mapKeyTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapValueTypeReference)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> mapKeyTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapValueTypeReference, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapKeyTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapValueTypeReference)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(com.fasterxml.jackson.core.type.TypeReference<?> valueTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapKeyTypeReference, com.fasterxml.jackson.core.type.TypeReference<?> mapValueTypeReference, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
TypedJsonJacksonCodec
public TypedJsonJacksonCodec(ClassLoader classLoader, TypedJsonJacksonCodec codec)
-
-
Method Detail
-
initTypeInclusion
protected void initTypeInclusion(com.fasterxml.jackson.databind.ObjectMapper mapObjectMapper)
- Overrides:
initTypeInclusion
in classJsonJacksonCodec
-
getValueDecoder
public Decoder<Object> getValueDecoder()
Description copied from interface:Codec
Returns object decoder used for any objects stored Redis structure except HMAP- Specified by:
getValueDecoder
in interfaceCodec
- Overrides:
getValueDecoder
in classJsonJacksonCodec
- Returns:
- decoder
-
getValueEncoder
public Encoder getValueEncoder()
Description copied from interface:Codec
Returns object encoder used for any objects stored Redis structure except HMAP- Specified by:
getValueEncoder
in interfaceCodec
- Overrides:
getValueEncoder
in classJsonJacksonCodec
- Returns:
- encoder
-
getMapKeyDecoder
public Decoder<Object> getMapKeyDecoder()
Description copied from interface:Codec
Returns object decoder used for hash map keys in HMAP Redis structure- Specified by:
getMapKeyDecoder
in interfaceCodec
- Overrides:
getMapKeyDecoder
in classBaseCodec
- Returns:
- decoder
-
getMapValueEncoder
public Encoder getMapValueEncoder()
Description copied from interface:Codec
Returns object encoder used for hash map values in HMAP Redis structure- Specified by:
getMapValueEncoder
in interfaceCodec
- Overrides:
getMapValueEncoder
in classBaseCodec
- Returns:
- encoder
-
getMapKeyEncoder
public Encoder getMapKeyEncoder()
Description copied from interface:Codec
Returns object encoder used for hash map keys in HMAP Redis structure- Specified by:
getMapKeyEncoder
in interfaceCodec
- Overrides:
getMapKeyEncoder
in classBaseCodec
- Returns:
- encoder
-
getMapValueDecoder
public Decoder<Object> getMapValueDecoder()
Description copied from interface:Codec
Returns object decoder used for hash map values in HMAP Redis structure- Specified by:
getMapValueDecoder
in interfaceCodec
- Overrides:
getMapValueDecoder
in classBaseCodec
- Returns:
- decoder
-
-