Class MsgPackMergeTool


  • public final class MsgPackMergeTool
    extends Object
    • 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
    • Constructor Detail

      • MsgPackMergeTool

        public MsgPackMergeTool​(int initialDocumentSize)
    • 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()