public class BinaryReadDocumentContext extends Object implements ReadDocumentContext
| Modifier and Type | Field and Description |
|---|---|
long |
lastStart |
protected boolean |
notComplete |
protected boolean |
present |
protected long |
readLimit |
protected long |
readPosition |
long |
start |
protected AbstractWire |
wire |
| Constructor and Description |
|---|
BinaryReadDocumentContext(Wire wire) |
BinaryReadDocumentContext(Wire wire,
boolean ensureFullRead) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
closeReadLimit(long readLimit) |
void |
closeReadPosition(long readPosition) |
long |
index()
Index last read, only available for read contexts.
|
boolean |
isMetaData() |
boolean |
isNotComplete() |
boolean |
isPresent() |
void |
metaData(boolean metaData)
Set the metaData flag.
|
protected boolean |
rollback() |
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
|
void |
setStart(long start) |
int |
sourceId() |
void |
start() |
String |
toString() |
Wire |
wire() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisDatapublic long start
public long lastStart
@Nullable protected AbstractWire wire
protected boolean present
protected boolean notComplete
protected long readPosition
protected long readLimit
public BinaryReadDocumentContext(@Nullable
Wire wire)
public BinaryReadDocumentContext(@Nullable
Wire wire,
boolean ensureFullRead)
public boolean isMetaData()
isMetaData in interface DocumentContextpublic void metaData(boolean metaData)
DocumentContextmetaData in interface DocumentContextmetaData - write as metaData instead of data if true.public boolean isPresent()
isPresent in interface DocumentContextpublic void closeReadPosition(long readPosition)
closeReadPosition in interface ReadDocumentContextpublic void closeReadLimit(long readLimit)
closeReadLimit in interface ReadDocumentContext@Nullable public Wire wire()
wire in interface DocumentContextprotected boolean rollback()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic void start()
start in interface ReadDocumentContextpublic long index()
SourceContextindex in interface SourceContextpublic int sourceId()
sourceId in interface SourceContextpublic boolean isNotComplete()
isNotComplete in interface DocumentContextpublic void rollbackOnClose()
DocumentContextrollbackOnClose in interface DocumentContextpublic void setStart(long start)
Copyright © 2019. All rights reserved.