Package org.nuxeo.ecm.core.bulk.message
Class MapAsJsonAsStringEncoding
- java.lang.Object
-
- org.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>
-
- org.nuxeo.ecm.core.bulk.message.MapAsJsonAsStringEncoding
-
public class MapAsJsonAsStringEncoding extends org.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>
ThisCustomEncodingencodes/decodesMap<String,Serializable> to a JSONStringusing Jackson before encoding it in Avro format.- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.fasterxml.jackson.databind.ObjectMapperMAPPERprotected static intNULL_SCHEMA_INDEXprotected static intSTRING_SCHEMA_INDEX
-
Constructor Summary
Constructors Constructor Description MapAsJsonAsStringEncoding()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Serializable>read(Object o, org.apache.avro.io.Decoder decoder)protected voidwrite(Object o, org.apache.avro.io.Encoder encoder)
-
-
-
Field Detail
-
NULL_SCHEMA_INDEX
protected static final int NULL_SCHEMA_INDEX
- See Also:
- Constant Field Values
-
STRING_SCHEMA_INDEX
protected static final int STRING_SCHEMA_INDEX
- See Also:
- Constant Field Values
-
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
-
-
Method Detail
-
write
protected void write(Object o, org.apache.avro.io.Encoder encoder) throws IOException
- Specified by:
writein classorg.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>- Throws:
IOException
-
read
protected Map<String,Serializable> read(Object o, org.apache.avro.io.Decoder decoder) throws IOException
- Specified by:
readin classorg.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>- Throws:
IOException
-
-