Package org.redisson.codec
Class JsonJacksonCodec
- java.lang.Object
-
- org.redisson.client.codec.BaseCodec
-
- org.redisson.codec.JsonJacksonCodec
-
- All Implemented Interfaces:
Codec
- Direct Known Subclasses:
AvroJacksonCodec
,CborJacksonCodec
,IonJacksonCodec
,MsgPackJacksonCodec
,SmileJacksonCodec
,TypedJsonJacksonCodec
public class JsonJacksonCodec extends BaseCodec
Json codec based on Jackson implementation. https://github.com/FasterXML/jacksonFully thread-safe.
- Author:
- Nikita Koksharov
- See Also:
CborJacksonCodec
,MsgPackJacksonCodec
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonJacksonCodec.ThrowableMixIn
-
Field Summary
Fields Modifier and Type Field Description static JsonJacksonCodec
INSTANCE
protected com.fasterxml.jackson.databind.ObjectMapper
mapObjectMapper
-
Fields inherited from class org.redisson.client.codec.BaseCodec
SKIPPED_CODECS
-
-
Constructor Summary
Constructors Constructor Description JsonJacksonCodec()
JsonJacksonCodec(com.fasterxml.jackson.databind.ObjectMapper mapObjectMapper)
JsonJacksonCodec(ClassLoader classLoader)
JsonJacksonCodec(ClassLoader classLoader, JsonJacksonCodec codec)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static com.fasterxml.jackson.databind.ObjectMapper
createObjectMapper(ClassLoader classLoader, com.fasterxml.jackson.databind.ObjectMapper om)
ClassLoader
getClassLoader()
Returns class loader object used to load classes used in decoding processcom.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
Decoder<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
init(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected void
initTypeInclusion(com.fasterxml.jackson.databind.ObjectMapper mapObjectMapper)
-
Methods inherited from class org.redisson.client.codec.BaseCodec
copy, getMapKeyDecoder, getMapKeyEncoder, getMapValueDecoder, getMapValueEncoder, toString
-
-
-
-
Field Detail
-
INSTANCE
public static final JsonJacksonCodec INSTANCE
-
mapObjectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper mapObjectMapper
-
-
Constructor Detail
-
JsonJacksonCodec
public JsonJacksonCodec()
-
JsonJacksonCodec
public JsonJacksonCodec(ClassLoader classLoader)
-
JsonJacksonCodec
public JsonJacksonCodec(ClassLoader classLoader, JsonJacksonCodec codec)
-
JsonJacksonCodec
public JsonJacksonCodec(com.fasterxml.jackson.databind.ObjectMapper mapObjectMapper)
-
-
Method Detail
-
createObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper(ClassLoader classLoader, com.fasterxml.jackson.databind.ObjectMapper om)
-
initTypeInclusion
protected void initTypeInclusion(com.fasterxml.jackson.databind.ObjectMapper mapObjectMapper)
-
init
protected void init(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
getValueDecoder
public Decoder<Object> getValueDecoder()
Description copied from interface:Codec
Returns object decoder used for any objects stored Redis structure except HMAP- Returns:
- decoder
-
getValueEncoder
public Encoder getValueEncoder()
Description copied from interface:Codec
Returns object encoder used for any objects stored Redis structure except HMAP- Returns:
- encoder
-
getClassLoader
public ClassLoader getClassLoader()
Description copied from interface:Codec
Returns class loader object used to load classes used in decoding process- Specified by:
getClassLoader
in interfaceCodec
- Overrides:
getClassLoader
in classBaseCodec
- Returns:
- class loader
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
-