Package io.zeebe.msgpack.mapping
Class MsgPackMergeTool
- java.lang.Object
-
- io.zeebe.msgpack.mapping.MsgPackMergeTool
-
public final class MsgPackMergeTool extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXCEPTION_MSG_MAPPING_NULL_NOR_EMPTYThe message for the exception which is thrown if the mapping is either null or empty.static StringEXCEPTION_MSG_RESULTING_DOCUMENT_IS_NOT_OF_TYPE_MAPThe message for the exception, which is thrown if the resulting document is not a map (json object).static intMAX_JSON_KEY_LENThe maximum JSON key length.
-
Constructor Summary
Constructors Constructor Description MsgPackMergeTool(int initialDocumentSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmergeDocument(org.agrona.DirectBuffer document, Mapping... mappings)Throws no mapping exceptions.voidmergeDocumentStrictly(org.agrona.DirectBuffer document, Mapping... mappings)Throws exceptions on ambiguous mapping resultsvoidreset()org.agrona.DirectBufferwriteResultToBuffer()
-
-
-
Field Detail
-
MAX_JSON_KEY_LEN
public static final int MAX_JSON_KEY_LEN
The maximum JSON key length.- See Also:
- Constant Field Values
-
EXCEPTION_MSG_RESULTING_DOCUMENT_IS_NOT_OF_TYPE_MAP
public static final String EXCEPTION_MSG_RESULTING_DOCUMENT_IS_NOT_OF_TYPE_MAP
The message for the exception, which is thrown if the resulting document is not a map (json object).- See Also:
- Constant Field Values
-
EXCEPTION_MSG_MAPPING_NULL_NOR_EMPTY
public static final String EXCEPTION_MSG_MAPPING_NULL_NOR_EMPTY
The message for the exception which is thrown if the mapping is either null or empty.- See Also:
- Constant Field Values
-
-
Method Detail
-
reset
public void reset()
-
mergeDocument
public void mergeDocument(org.agrona.DirectBuffer document, Mapping... mappings)Throws no mapping exceptions. Assumes default values in case a mapping has ambiguous results.
-
mergeDocumentStrictly
public void mergeDocumentStrictly(org.agrona.DirectBuffer document, Mapping... mappings)Throws exceptions on ambiguous mapping results- Throws:
MappingException- in case a mapping has ambiguous results
-
writeResultToBuffer
public org.agrona.DirectBuffer writeResultToBuffer()
-
-