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>>
ThisCustomEncoding
encodes/decodesMap
<String
,Serializable
> to a JSONString
using Jackson before encoding it in Avro format.- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.fasterxml.jackson.databind.ObjectMapper
MAPPER
protected static int
NULL_SCHEMA_INDEX
protected static int
STRING_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 void
write(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:
write
in 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:
read
in classorg.apache.avro.reflect.CustomEncoding<Map<String,Serializable>>
- Throws:
IOException
-
-