public class HashWire extends Object implements WireOut, net.openhft.chronicle.bytes.HexDumpBytesDescription
WireOut.EndOfWire| Constructor and Description |
|---|
HashWire() |
| Modifier and Type | Method and Description |
|---|---|
DocumentContext |
acquireWritingDocument(boolean metaData)
Start or reuse an existing a DocumentContext, optionally call close() when done.
|
@NotNull WireOut |
addPadding(int paddingToAdd) |
@NotNull net.openhft.chronicle.bytes.Bytes<?> |
bytes()
Returns the underlying
Bytes stored by the wire. |
net.openhft.chronicle.bytes.HexDumpBytesDescription<?> |
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()
This will reset the positions and the header number.
|
long |
enterHeader(long safeLength)
INTERNAL METHOD, call writingDocument instead
|
@NotNull ValueOut |
getValueOut()
Obtain the value out
|
int |
hash32() |
static int |
hash32(Object value) |
static int |
hash32(WriteMarshallable value) |
long |
hash64() |
static long |
hash64(Object value) |
static long |
hash64(WriteMarshallable value) |
long |
headerNumber() |
@NotNull WireOut |
headerNumber(long headerNumber) |
boolean |
isBinary()
Determine whether direct access to the underlying byte() makes sense or should it be treated as text
|
@NotNull net.openhft.chronicle.core.values.BooleanValue |
newBooleanReference()
Creates and returns a new
BooleanValue. |
@NotNull net.openhft.chronicle.core.values.IntArrayValues |
newIntArrayReference()
Creates and returns a new
IntArrayValues. |
@NotNull net.openhft.chronicle.core.values.IntValue |
newIntReference()
Creates and returns a new
IntValue. |
@NotNull net.openhft.chronicle.core.values.LongArrayValues |
newLongArrayReference()
Creates and returns a new
LongArrayValues. |
@NotNull net.openhft.chronicle.core.values.LongValue |
newLongReference()
Creates and returns a new
LongValue. |
@NotNull ObjectOutput |
objectOutput() |
@Nullable Object |
parent()
Returns the wire parent object.
|
void |
parent(Object parent)
Assigns the wire parent object for later retrieval.
|
@NotNull 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 |
reset()
Reset the state of the wire
|
void |
updateFirstHeader()
INTERNAL METHOD, call writingDocument instead
|
void |
updateFirstHeader(long headerLen)
INTERNAL METHOD, call writingDocument instead
|
void |
updateHeader(long position,
boolean metaData,
int expectedHeader)
INTERNAL METHOD, call writingDocument instead
|
boolean |
usePadding() |
void |
usePadding(boolean usePadding) |
boolean |
useSelfDescribingMessage(@NotNull net.openhft.chronicle.bytes.CommonMarshallable object)
Should this wire write the object as a Marshallable or BytesMarshallable
|
@NotNull ValueOut |
write()
Write an empty filed marker
|
@NotNull ValueOut |
write(@NotNull CharSequence name) |
@NotNull ValueOut |
write(@NotNull WireKey key)
Write a key for wires that support fields.
|
@NotNull WireOut |
writeComment(CharSequence s) |
void |
writeEndEvent() |
boolean |
writeEndOfWire(long timeout,
TimeUnit timeUnit,
long lastPosition)
Write the end of wire marker, unless one is already written.
|
@NotNull ValueOut |
writeEvent(Class ignored,
@NotNull Object eventKey) |
boolean |
writeFirstHeader()
INTERNAL METHOD, call writingDocument instead
|
void |
writeStartEvent()
Start an event object, mostly for internal use.
|
@NotNull DocumentContext |
writingDocument(boolean metaData)
This will increment the headerNumber as appropriate if successful
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdropDefault, endOfWire, padToCacheAlign, writeAlignTo, writeAllAsMap, writeDocument, writeEventId, writeEventId, writeEventName, writeEventName, writeNotCompleteDocument, writingDocument, writingIsCompletenewTwoLongReference, notCompleteIsNotPresent, notCompleteIsNotPresentbuilder, methodWriter, methodWriter, methodWriterBuilder, methodWriterBuilder, recordHistory, writeBytes, writeDocument, writeDocument, writeMap, writeMessage, writeMessage, writeTextpublic static long hash64(WriteMarshallable value)
public static long hash64(Object value)
public static int hash32(WriteMarshallable value)
public static int hash32(Object value)
public 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 lookuppublic void clear()
WireOutclear in interface WireCommonclear in interface WireOutpublic void reset()
WireCommonreset in interface WireCommon@Nullable public @Nullable 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 void usePadding(boolean usePadding)
usePadding in interface WireCommonpublic boolean usePadding()
usePadding in interface WireCommonpublic long hash64()
public int hash32()
@NotNull public @NotNull ValueOut write()
WireOut@NotNull public @NotNull ValueOut write(@NotNull @NotNull WireKey key)
WireOut@NotNull public @NotNull ValueOut write(@NotNull @NotNull CharSequence name)
@NotNull public @NotNull ValueOut writeEvent(Class ignored, @NotNull @NotNull Object eventKey)
writeEvent in interface WireOutpublic void writeStartEvent()
WireOutwriteStartEvent in interface WireOutpublic void writeEndEvent()
writeEndEvent in interface WireOut@NotNull public @NotNull ValueOut getValueOut()
WireOutgetValueOut in interface WireOut@NotNull public @NotNull ObjectOutput objectOutput()
objectOutput in interface WireOut@NotNull public @NotNull WireOut writeComment(CharSequence s)
writeComment in interface WireOut@NotNull public @NotNull WireOut addPadding(int paddingToAdd)
addPadding in interface WireOut@NotNull public @NotNull WireOut headerNumber(long headerNumber)
headerNumber in interface WireCommonpublic long headerNumber()
headerNumber in interface WireCommon@NotNull public @NotNull DocumentContext writingDocument(boolean metaData)
WireOutwritingDocument in interface DocumentWrittenwritingDocument in interface MarshallableOutwritingDocument in interface WireOutmetaData - if true the document context will be used for writing meta data,
otherwise datapublic DocumentContext acquireWritingDocument(boolean metaData)
MarshallableOutacquireWritingDocument in interface DocumentWrittenacquireWritingDocument in interface MarshallableOutacquireWritingDocument in interface WireOutpublic long enterHeader(long safeLength)
WireOutStart a header for a document
enterHeader in interface WireOutsafeLength - ensure there is at least this much spacepublic void updateHeader(long position,
boolean metaData,
int expectedHeader)
WireOutUpdate/end a header for a document
updateHeader in interface WireOutpublic boolean writeFirstHeader()
WireOutStart the first header, if there is none This will increment the headerNumber as appropriate if successful
Note: the file might contain other data and the caller has to check this.
writeFirstHeader in interface WireOutpublic void updateFirstHeader()
WireOutupdate the first header after writing.
updateFirstHeader in interface WireOutpublic void updateFirstHeader(long headerLen)
WireOut
update the first header after writing headerEndPos bytes.
updateFirstHeader 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 wirefalse if it was already there.@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.HexDumpBytesDescription<?> bytesComment()
WireCommonbytesComment in interface WireCommon@NotNull public @NotNull net.openhft.chronicle.core.values.IntValue newIntReference()
WireCommonIntValue. The IntValue implementation that is
returned depends on the wire implementation.newIntReference in interface WireCommonIntValue.@NotNull public @NotNull net.openhft.chronicle.core.values.LongValue newLongReference()
WireCommonLongValue. The LongValue implementation that is
returned depends on the wire implementation.newLongReference in interface WireCommonLongValue@NotNull public @NotNull net.openhft.chronicle.core.values.BooleanValue newBooleanReference()
WireCommonBooleanValue. The BooleanValue implementation that is
returned depends on the wire implementation.newBooleanReference in interface WireCommonBooleanValue.public boolean useSelfDescribingMessage(@NotNull
@NotNull net.openhft.chronicle.bytes.CommonMarshallable object)
WireCommonuseSelfDescribingMessage in interface WireCommonpublic boolean isBinary()
WireCommonisBinary in interface WireCommon@NotNull public @NotNull net.openhft.chronicle.core.values.LongArrayValues newLongArrayReference()
WireCommonLongArrayValues. The LongArrayValues implementation that
is returned depends on the wire implementation.newLongArrayReference in interface WireCommonLongArrayValues@NotNull public @NotNull net.openhft.chronicle.core.values.IntArrayValues newIntArrayReference()
WireCommonIntArrayValues. The IntArrayValues implementation that
is returned depends on the wire implementation.newIntArrayReference in interface WireCommonIntArrayValues@NotNull public @NotNull 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.Copyright © 2023. All rights reserved.