public abstract class WrappedDocumentContext extends Object implements DocumentContext
NOOP| Modifier | Constructor and Description |
|---|---|
protected |
WrappedDocumentContext(DocumentContext dc)
Constructs a new instance of WrappedDocumentContext that wraps the provided DocumentContext.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the
DocumentContext and releases any held resources. |
DocumentContext |
dc()
Getter method to retrieve the wrapped DocumentContext instance.
|
WrappedDocumentContext |
dc(DocumentContext dc)
Setter method to update the wrapped DocumentContext instance.
|
long |
index()
Obtains the index of the last read operation from this source context.
|
boolean |
isData()
Determines if the
DocumentContext is in an open state. |
boolean |
isMetaData()
Checks it the
DocumentContext is metadata. |
boolean |
isNotComplete() |
boolean |
isPresent()
Checks if the
DocumentContext is present. |
void |
rollbackOnClose()
Invoked to signal an error condition in the current context.
|
int |
sourceId()
Retrieves the source ID associated with this context.
|
@Nullable Wire |
wire()
Returns the
Wire associated with the Document. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisOpen, reset, rollbackIfNotCompleteprotected WrappedDocumentContext(DocumentContext dc)
dc - The DocumentContext to be wrapped.public DocumentContext dc()
public WrappedDocumentContext dc(DocumentContext dc)
dc - The new DocumentContext instance to be wrapped.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 DocumentContext@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 boolean isNotComplete()
isNotComplete in interface DocumentContextpublic void close()
DocumentContextDocumentContext and releases any held resources.
It is crucial to ensure that this method is invoked after the context's operations are completed
to prevent any potential resource leaks or data corruption.close in interface Closeableclose in interface AutoCloseableclose in interface DocumentContextpublic int sourceId()
SourceContextsourceId in interface SourceContextpublic long index()
throws net.openhft.chronicle.core.io.IORuntimeException
SourceContextindex in interface SourceContextnet.openhft.chronicle.core.io.IORuntimeException - if any issue arises while fetching the index.public boolean isData()
DocumentContextDocumentContext is in an open state.
This method essentially checks the inverse of the completion status of the context.isData in interface DocumentContexttrue if the context is open (i.e., the NOT_COMPLETE flag is set),
false otherwise.public void rollbackOnClose()
DocumentContextrollbackOnClose in interface DocumentContextCopyright © 2024. All rights reserved.