public interface ReferenceCodecProvider
Modifier and Type | Method and Description |
---|---|
<T extends Codec> |
getCodec(Class<T> codecClass)
Get codec instance by its class.
|
<T extends Codec> |
getCodec(REntity anno,
Class<?> cls,
Config config)
Get a codec instance by a REntity annotation and the class annotated with
it.
|
<T extends Codec,K extends RObject> |
getCodec(RObjectField anno,
Class<?> cls,
Class<K> rObjectClass,
String fieldName,
Config config)
Get a codec instance by a RObjectField annotation and the class annotated
with REntity, the implementation class of RObject the field is going to
be transformed into and the name of the field with this RObjectField
annotation.
|
<T extends Codec> |
registerCodec(Class<T> codecClass,
T codec)
Register a codec by its class or super class.
|
<T extends Codec> T getCodec(Class<T> codecClass)
T
- the expected codec type.codecClass
- the codec class used to lookup the codec.<T extends Codec> T getCodec(REntity anno, Class<?> cls, Config config)
T
- the expected codec type.anno
- REntity annotation used on the class.cls
- The class that has the REntity annotation.config
- Redisson config object<T extends Codec,K extends RObject> T getCodec(RObjectField anno, Class<?> cls, Class<K> rObjectClass, String fieldName, Config config)
T
- the expected codec type.K
- the type of the RObject.anno
- RObjectField annotation used on the field.cls
- The class that has the REntity annotation.rObjectClass
- the implementation class of RObject the field is going
to be transformed into.fieldName
- the name of the field with this RObjectField annotation.config
- Redisson config objectCopyright © 2014–2020 Redisson. All rights reserved.