Package io.zeebe.msgpack.mapping
Class MsgPackDocumentIndexer
- java.lang.Object
-
- io.zeebe.msgpack.mapping.MsgPackDocumentIndexer
-
- All Implemented Interfaces:
MsgPackTokenVisitor
public final class MsgPackDocumentIndexer extends Object implements MsgPackTokenVisitor
Represents an message pack document indexer. During the indexing of an existing message pack document anMsgPackTreeobject will be constructed, which corresponds to the structure of the message pack document.Example:
Say we have the following json as message pack document: { "object1":{ "field1": true, "array":[ 1,2,3]}, "field2" : "String" }The
#index()method will return anMsgPackTreeobject, which has the following structure:$ / \ field2 object1 | / \ String field1 array | / | \ true 1 2 3Then this correspond to the following message pack tree structure:
NodeTypes:
1object1 : MAP_NODE 2field1 : LEAF 2array : ARRAY_NODE 1field2: LEAFNodeChildsMap:
1object1: field1, array 2array : 2array1, 2array2, 2array3,LeafMap:
2field1: mapping 2array1: mapping 2array2: mapping 2array3: mapping 1field2: mapping
-
-
Constructor Summary
Constructors Constructor Description MsgPackDocumentIndexer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MsgPackTreeindex(org.agrona.DirectBuffer document)voidvisitElement(int position, MsgPackToken currentValue)
-
-
-
Method Detail
-
index
public MsgPackTree index(org.agrona.DirectBuffer document)
-
visitElement
public void visitElement(int position, MsgPackToken currentValue)- Specified by:
visitElementin interfaceMsgPackTokenVisitor
-
-