public abstract class AbstractWire extends Object implements Wire
WireIn.HeaderTypeMarshallableOut.Padding| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
ASSERTIONS |
protected @NotNull net.openhft.chronicle.bytes.Bytes<?> |
bytes |
protected net.openhft.chronicle.core.pool.ClassLookup |
classLookup |
protected Object |
parent |
protected boolean |
use8bit |
MARSHALLABLE_IN_INTERN_SIZE| Constructor and Description |
|---|
AbstractWire(@NotNull net.openhft.chronicle.bytes.Bytes bytes,
boolean use8bit) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull net.openhft.chronicle.bytes.Bytes<?> |
bytes()
Returns the underlying
Bytes stored by the wire. |
net.openhft.chronicle.bytes.BytesComment<?> |
bytesComment()
Returns the bytes() but only for comment.
|
net.openhft.chronicle.core.pool.ClassLookup |
classLookup()
Returns the current
ClassLookup implementation being used for class lookup. |
void |
classLookup(net.openhft.chronicle.core.pool.ClassLookup classLookup)
Sets the
ClassLookup implementation to be used for class lookup. |
void |
clear()
Resets the state of the underlying
Bytes stored by the wire. |
boolean |
endUse()
Check the Wire was not used by another thread.
|
long |
enterHeader(int safeLength) |
void |
forceNotInsideHeader()
used by write bytes when doing a rollback
|
long |
headerNumber() |
@NotNull Wire |
headerNumber(long headerNumber) |
void |
headNumberCheck(HeadNumberChecker headNumberChecker) |
boolean |
isInsideHeader() |
boolean |
notCompleteIsNotPresent()
If a message is marked as NOT_COMPLETE is it still present.
|
void |
notCompleteIsNotPresent(boolean notCompleteIsNotPresent) |
ObjectInput |
objectInput() |
ObjectOutput |
objectOutput() |
Object |
parent()
Returns the wire parent object.
|
void |
parent(Object parent)
Assigns the wire parent object for later retrieval.
|
net.openhft.chronicle.threads.Pauser |
pauser()
Returns the current
Pauser implementation being used for blocking operations. |
void |
pauser(net.openhft.chronicle.threads.Pauser pauser)
Sets the
Pauser implementation to be used for blocking operations. |
void |
readAndSetLength(long position) |
@NotNull WireIn.HeaderType |
readDataHeader(boolean includeMetaData) |
long |
readEventNumber() |
void |
readFirstHeader() |
void |
readFirstHeader(long timeout,
TimeUnit timeUnit) |
void |
readMetaDataHeader() |
boolean |
startUse()
Used to check that the wire is being used by only one thread
|
void |
updateFirstHeader()
update the first header after writing.
|
void |
updateHeader(long position,
boolean metaData,
int expectedHeader) |
boolean |
usePadding() |
void |
usePadding(boolean usePadding) |
boolean |
writeEndOfWire(long timeout,
TimeUnit timeUnit,
long lastPosition)
Write the end of wire marker, unless one is already written.
|
boolean |
writeFirstHeader()
Start the first header, if there is none This will increment the headerNumber as appropriate
if successful
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasText, consumePadding, copyTo, endEvent, getValueIn, hasMore, hintReadInputOrder, isEmpty, isEndEvent, isNotEmptyAfterPadding, rawReadData, read, read, read, read, readAlignTo, readAllAsMap, readComment, readDataHeader, readDocument, readDocument, readEvent, readEventName, readingDocument, readingDocument, readingPeekYaml, startEventmethodReader, methodReaderBuilder, peekDocument, readBytes, readBytes, readDocument, readMap, readText, readTextacquireWritingDocument, addPadding, dropDefault, getValueOut, padToCacheAlign, write, write, write, writeAlignTo, writeAllAsMap, writeComment, writeDocument, writeEndEvent, writeEvent, writeEventId, writeEventId, writeEventName, writeEventName, writeNotCompleteDocument, writeStartEvent, writingDocument, writingDocumentnewBooleanReference, newIntArrayReference, newIntReference, newLongArrayReference, newLongReference, newTwoLongReferencemethodWriter, methodWriter, methodWriterBuilder, padToCacheAlignMode, recordHistory, writeBytes, writeDocument, writeDocument, writeMap, writeMessage, writeMessage, writeTextprotected static final boolean ASSERTIONS
@NotNull protected final @NotNull net.openhft.chronicle.bytes.Bytes<?> bytes
protected final boolean use8bit
protected net.openhft.chronicle.core.pool.ClassLookup classLookup
protected Object parent
public AbstractWire(@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes bytes,
boolean use8bit)
public boolean isInsideHeader()
public net.openhft.chronicle.threads.Pauser pauser()
WireCommonPauser implementation being used for blocking operations.pauser in interface WireCommonPauser implementation being used for blocking operationspublic void pauser(net.openhft.chronicle.threads.Pauser pauser)
WireCommonPauser implementation to be used for blocking operations.pauser in interface WireCommonpauser - implementation to be used for blocking operations.public void clear()
WireCommonBytes stored by the wire.@NotNull public @NotNull Wire headerNumber(long headerNumber)
headerNumber in interface WireheaderNumber in interface WireCommonpublic void headNumberCheck(HeadNumberChecker headNumberChecker)
public long headerNumber()
headerNumber in interface WireCommonpublic void classLookup(net.openhft.chronicle.core.pool.ClassLookup classLookup)
WireCommonClassLookup implementation to be used for class lookup.classLookup in interface WireCommonclassLookup - implementation to be used for class lookup.public net.openhft.chronicle.core.pool.ClassLookup classLookup()
WireCommonClassLookup implementation being used for class lookup.classLookup in interface WireCommonClassLookup implementation being used for class lookup@NotNull public @NotNull net.openhft.chronicle.bytes.Bytes<?> bytes()
WireCommonBytes stored by the wire.bytes in interface WireCommonBytes stored by the wirepublic net.openhft.chronicle.bytes.BytesComment<?> bytesComment()
WireCommonbytesComment in interface WireCommon@NotNull public @NotNull WireIn.HeaderType readDataHeader(boolean includeMetaData)
readDataHeader in interface WireInpublic void readAndSetLength(long position)
readAndSetLength in interface WireInpublic void readMetaDataHeader()
readMetaDataHeader in interface WireInpublic void readFirstHeader()
throws StreamCorruptedException
readFirstHeader in interface WireInStreamCorruptedExceptionpublic void readFirstHeader(long timeout,
TimeUnit timeUnit)
throws TimeoutException,
StreamCorruptedException
readFirstHeader in interface WireInTimeoutExceptionStreamCorruptedExceptionpublic long enterHeader(int safeLength)
enterHeader in interface WireOutpublic void updateHeader(long position,
boolean metaData,
int expectedHeader)
throws StreamCorruptedException
updateHeader in interface WireOutStreamCorruptedExceptionpublic boolean writeFirstHeader()
WireOutNote: the file might contain other data and the caller has to check this.
writeFirstHeader in interface WireOutpublic void updateFirstHeader()
WireOutupdateFirstHeader in interface WireOutpublic boolean writeEndOfWire(long timeout,
TimeUnit timeUnit,
long lastPosition)
WireOutwriteEndOfWire in interface WireOuttimeout - throw TimeoutException if it could not write the marker in time.timeUnit - of the timeoutlastPosition - the end of the wirepublic Object parent()
WireCommonnull is
returned instead.parent in interface WireCommonnull if none was assigned.public void parent(Object parent)
WireCommonparent in interface WireCommonparent - to set, or null if there isn't one.public boolean startUse()
WireCommonstartUse in interface WireCommonpublic boolean endUse()
WireCommonendUse in interface WireCommonpublic boolean notCompleteIsNotPresent()
WireCommonnotCompleteIsNotPresent in interface WireCommonpublic void notCompleteIsNotPresent(boolean notCompleteIsNotPresent)
notCompleteIsNotPresent in interface WireCommonpublic ObjectOutput objectOutput()
objectOutput in interface WireOutpublic ObjectInput objectInput()
objectInput in interface WireInpublic long readEventNumber()
readEventNumber in interface WireInpublic void forceNotInsideHeader()
public void usePadding(boolean usePadding)
usePadding in interface WireCommonpublic boolean usePadding()
usePadding in interface WireCommonCopyright © 2020. All rights reserved.