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 structureEncodergetMapKeyEncoder()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 structureEncodergetMapValueEncoder()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 HMAPEncodergetValueEncoder()Returns object encoder used for any objects stored Redis structure except HMAPprotected voidinitTypeInclusion(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:
initTypeInclusionin classJsonJacksonCodec
-
getValueDecoder
public Decoder<Object> getValueDecoder()
Description copied from interface:CodecReturns object decoder used for any objects stored Redis structure except HMAP- Specified by:
getValueDecoderin interfaceCodec- Overrides:
getValueDecoderin classJsonJacksonCodec- Returns:
- decoder
-
getValueEncoder
public Encoder getValueEncoder()
Description copied from interface:CodecReturns object encoder used for any objects stored Redis structure except HMAP- Specified by:
getValueEncoderin interfaceCodec- Overrides:
getValueEncoderin classJsonJacksonCodec- Returns:
- encoder
-
getMapKeyDecoder
public Decoder<Object> getMapKeyDecoder()
Description copied from interface:CodecReturns object decoder used for hash map keys in HMAP Redis structure- Specified by:
getMapKeyDecoderin interfaceCodec- Overrides:
getMapKeyDecoderin classBaseCodec- Returns:
- decoder
-
getMapValueEncoder
public Encoder getMapValueEncoder()
Description copied from interface:CodecReturns object encoder used for hash map values in HMAP Redis structure- Specified by:
getMapValueEncoderin interfaceCodec- Overrides:
getMapValueEncoderin classBaseCodec- Returns:
- encoder
-
getMapKeyEncoder
public Encoder getMapKeyEncoder()
Description copied from interface:CodecReturns object encoder used for hash map keys in HMAP Redis structure- Specified by:
getMapKeyEncoderin interfaceCodec- Overrides:
getMapKeyEncoderin classBaseCodec- Returns:
- encoder
-
getMapValueDecoder
public Decoder<Object> getMapValueDecoder()
Description copied from interface:CodecReturns object decoder used for hash map values in HMAP Redis structure- Specified by:
getMapValueDecoderin interfaceCodec- Overrides:
getMapValueDecoderin classBaseCodec- Returns:
- decoder
-
-