T
- The type of the handle used for each splitpublic abstract static class JSONSplitter.Visitor<T extends AbstractWriteHandle>
extends java.lang.Object
Constructor and Description |
---|
Visitor() |
Modifier and Type | Method and Description |
---|---|
void |
endArray(java.lang.String containerKey)
Receives a notification when hitting end of array.
|
void |
endObject(java.lang.String containerKey)
Receives a notification when hitting the end of current object.
|
abstract T |
makeBufferedHandle(com.fasterxml.jackson.core.JsonParser containerParser)
Construct buffered content handles with proper types from JsonParser.
|
DocumentWriteOperation |
makeDocumentWriteOperation(JSONSplitter.UriMaker uriMaker,
long count,
T handle)
Construct buffered DocumentWriteOperations from the handle which contains target content
|
java.lang.String |
serialize(com.fasterxml.jackson.core.JsonParser containerParser)
Serialize the target object or array in JsonParser to Strings.
|
NodeOperation |
startArray(java.lang.String containerKey)
This method inspects the state of the current array and decides whether to split it or not.
|
NodeOperation |
startObject(java.lang.String containerKey)
This method inspects the state of the current object and decides whether to split it or not.
|
public NodeOperation startObject(java.lang.String containerKey)
containerKey
- The key of the object which the value contains current objectpublic void endObject(java.lang.String containerKey)
containerKey
- The key of the object which the value contains current objectpublic NodeOperation startArray(java.lang.String containerKey)
containerKey
- The key of the object which the value contains current arraypublic void endArray(java.lang.String containerKey)
containerKey
- The key of the object which the value contains current arraypublic abstract T makeBufferedHandle(com.fasterxml.jackson.core.JsonParser containerParser)
containerParser
- the JsonParser with target object or arraypublic DocumentWriteOperation makeDocumentWriteOperation(JSONSplitter.UriMaker uriMaker, long count, T handle)
uriMaker
- the UriMake to construct the URI for each documentcount
- the count of each splithandle
- the handle contains target object or arraypublic java.lang.String serialize(com.fasterxml.jackson.core.JsonParser containerParser)
containerParser
- the JsonParser with target object or arrayCopyright © 2013-2021 MarkLogic Corporation.