public class TextReadDocumentContext extends Object implements ReadDocumentContext
| Modifier and Type | Field and Description |
|---|---|
static net.openhft.chronicle.bytes.BytesStore<?,?> |
EOD_SEP |
protected boolean |
notComplete |
protected boolean |
present |
static net.openhft.chronicle.bytes.BytesStore<?,?> |
SOD_SEP |
protected @Nullable AbstractWire |
wire |
NOOP| Constructor and Description |
|---|
TextReadDocumentContext(@Nullable AbstractWire wire) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
closeReadLimit(long readLimit)
Sets the read limit for this
ReadDocumentContext. |
void |
closeReadPosition(long readPosition)
Sets the read position for this
ReadDocumentContext. |
static void |
consumeToEndOfMessage(net.openhft.chronicle.bytes.Bytes<?> bytes) |
long |
index()
Index last read, only available for read contexts.
|
static boolean |
isEndOfMessage(net.openhft.chronicle.bytes.Bytes<?> bytes) |
boolean |
isMetaData()
Checks it the
DocumentContext is metadata. |
boolean |
isNotComplete() |
boolean |
isPresent()
Checks if the
DocumentContext is present. |
protected static boolean |
isWhiteSpaceAt(net.openhft.chronicle.bytes.Bytes<?> bytes) |
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
|
protected void |
skipSep(net.openhft.chronicle.bytes.Bytes<?> bytes) |
int |
sourceId()
Returns the source id of this source context.
|
void |
start() |
String |
toString() |
@Nullable Wire |
wire()
Returns the
Wire associated with the Document. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisData, isOpenpublic static final net.openhft.chronicle.bytes.BytesStore<?,?> SOD_SEP
public static final net.openhft.chronicle.bytes.BytesStore<?,?> EOD_SEP
@Nullable protected @Nullable AbstractWire wire
protected boolean present
protected boolean notComplete
public TextReadDocumentContext(@Nullable
@Nullable AbstractWire wire)
public static void consumeToEndOfMessage(net.openhft.chronicle.bytes.Bytes<?> bytes)
public static boolean isEndOfMessage(net.openhft.chronicle.bytes.Bytes<?> bytes)
protected static boolean isWhiteSpaceAt(net.openhft.chronicle.bytes.Bytes<?> bytes)
public boolean isMetaData()
DocumentContextDocumentContext is metadata. If it is, true is
returned, otherwise false.isMetaData in interface DocumentContextpublic boolean isPresent()
DocumentContextDocumentContext is present. If it is, true is returned,
otherwise false.isPresent in interface DocumentContextpublic void closeReadPosition(long readPosition)
ReadDocumentContextReadDocumentContext.closeReadPosition in interface ReadDocumentContextpublic void closeReadLimit(long readLimit)
ReadDocumentContextReadDocumentContext.closeReadLimit in interface ReadDocumentContext@Nullable public @Nullable 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 void close()
close in interface Closeableclose in interface AutoCloseableclose in interface DocumentContextpublic void reset()
DocumentContextreset in interface DocumentContextpublic void start()
start in interface ReadDocumentContextprotected void skipSep(net.openhft.chronicle.bytes.Bytes<?> bytes)
public void rollbackOnClose()
DocumentContextrollbackOnClose in interface DocumentContextpublic long index()
SourceContextindex in interface SourceContextpublic int sourceId()
SourceContextsourceId in interface SourceContextpublic boolean isNotComplete()
isNotComplete in interface DocumentContextCopyright © 2023. All rights reserved.