public class TextWriteDocumentContext extends Object implements WriteDocumentContext
| Modifier and Type | Field and Description |
|---|---|
protected int |
count |
protected long |
position |
protected Wire |
wire |
NOOP| Constructor and Description |
|---|
TextWriteDocumentContext(Wire wire) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
chainedElement()
Returns
true if this WriteDocumentContext is a
chained element. |
void |
chainedElement(boolean chainedElement)
Marks this
WriteDocumentContext as a chained element. |
void |
close() |
long |
index()
Index last read, only available for read contexts.
|
boolean |
isEmpty() |
boolean |
isMetaData()
Checks it the
DocumentContext is metadata. |
boolean |
isNotComplete() |
boolean |
isPresent()
Checks if the
DocumentContext is present. |
void |
reset()
call close once, then discard any remaining state
|
void |
rollbackOnClose()
Call this if you have detected an error condition and you want the context
rolled back when it is closed, rather than half a message committed
|
int |
sourceId()
Returns the source id of this source context.
|
void |
start(boolean metaData) |
Wire |
wire()
Returns the
Wire associated with the Document. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisData, isOpenprotected Wire wire
protected int count
protected long position
public TextWriteDocumentContext(Wire wire)
public void start(boolean metaData)
start in interface WriteDocumentContextpublic boolean isEmpty()
isEmpty in interface WriteDocumentContextpublic boolean isMetaData()
DocumentContextDocumentContext is metadata. If it is, true is
returned, otherwise false.isMetaData in interface DocumentContextpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface DocumentContextpublic void reset()
DocumentContextreset in interface DocumentContextpublic void rollbackOnClose()
DocumentContextrollbackOnClose in interface DocumentContextpublic boolean chainedElement()
WriteDocumentContexttrue if this WriteDocumentContext is a
chained element.chainedElement in interface WriteDocumentContexttrue if this WriteDocumentContext is a
chained element.public void chainedElement(boolean chainedElement)
WriteDocumentContextWriteDocumentContext as a chained element.chainedElement in interface WriteDocumentContextpublic boolean isPresent()
DocumentContextDocumentContext is present. If it is, true is returned,
otherwise false.isPresent in interface DocumentContextpublic Wire wire()
DocumentContextWire associated with the Document. It is possible that
null is returned, depending on the implementation.wire in interface DocumentContextWire associated with the Document.public long index()
SourceContextindex in interface SourceContextpublic int sourceId()
SourceContextsourceId in interface SourceContextpublic boolean isNotComplete()
isNotComplete in interface DocumentContextCopyright © 2023. All rights reserved.