public class HashWire extends Object implements WireOut, net.openhft.chronicle.bytes.BytesComment
MarshallableOut.PaddingDEFAULT_SAFE_LENGTH, TRY_WRITE_HEADER_FAILED| Constructor and Description |
|---|
HashWire() |
| Modifier and Type | Method and Description |
|---|---|
WireOut |
addPadding(int paddingToAdd) |
net.openhft.chronicle.bytes.Bytes<?> |
bytes() |
net.openhft.chronicle.bytes.BytesComment<?> |
bytesComment() |
net.openhft.chronicle.core.pool.ClassLookup |
classLookup() |
void |
classLookup(net.openhft.chronicle.core.pool.ClassLookup classLookup)
Define how classes should be looked up.
|
void |
clear()
This will reset the positions and the header number.
|
void |
endEvent() |
boolean |
endUse()
Check the Wire was not used by another thread.
|
long |
enterHeader(int safeLength) |
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() |
WireOut |
headerNumber(long headerNumber) |
boolean |
isTextWire() |
net.openhft.chronicle.core.values.BooleanValue |
newBooleanReference() |
net.openhft.chronicle.core.values.IntValue |
newIntReference() |
net.openhft.chronicle.core.values.LongArrayValues |
newLongArrayReference() |
net.openhft.chronicle.core.values.LongValue |
newLongReference() |
ObjectOutput |
objectOutput() |
Object |
parent()
Obtain the parent class of this wire if there is one
|
void |
parent(Object parent)
Assign a parent object to this wire for later retrieval.
|
net.openhft.chronicle.threads.Pauser |
pauser() |
void |
pauser(net.openhft.chronicle.threads.Pauser pauser) |
void |
startEvent()
Start an event object, mostly for internal use.
|
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) |
ValueOut |
write()
Write an empty filed marker
|
ValueOut |
write(CharSequence name) |
ValueOut |
write(WireKey key)
Write a key for wires that support fields.
|
WireOut |
writeComment(CharSequence s) |
void |
writeEndOfWire(long timeout,
TimeUnit timeUnit,
long lastPosition)
Write the end of wire marker, unless one is already written.
|
ValueOut |
writeEvent(Class ignored,
Object eventKey) |
boolean |
writeFirstHeader()
Start the first header, if there is none This will increment the headerNumber as appropriate
if successful
|
long |
writeHeaderOfUnknownLength(int safeLength,
long timeout,
TimeUnit timeUnit,
net.openhft.chronicle.core.values.LongValue lastPosition,
Sequence sequence)
Write a message of unknown length, handling timeouts and the end of wire marker.
|
DocumentContext |
writingDocument(boolean metaData)
This will increment the headerNumber as appropriate if successful
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdropDefault, padToCacheAlign, updateHeader, writeAlignTo, writeAllAsMap, writeDocument, writeEventId, writeEventName, writeEventName, writeHeader, writeHeaderOfUnknownLength, writeNotCompleteDocument, writingDocumentnewTwoLongReference, notCompleteIsNotPresent, notCompleteIsNotPresentmethodWriter, methodWriter, methodWriterBuilder, padToCacheAlignMode, recordHistory, writeBytes, writeDocument, writeDocument, writeMap, 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 in interface WireCommonclassLookup - to usepublic net.openhft.chronicle.core.pool.ClassLookup classLookup()
classLookup in interface WireCommonpublic void clear()
WireOutclear in interface WireCommonclear in interface WireOut@Nullable public Object parent()
WireCommonparent in interface WireCommonpublic 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 long hash64()
public int hash32()
@NotNull public ValueOut write()
WireOut@NotNull public ValueOut write(@NotNull WireKey key)
WireOut@NotNull public ValueOut write(@NotNull CharSequence name)
@NotNull public ValueOut writeEvent(Class ignored, @NotNull Object eventKey)
writeEvent in interface WireOutpublic void startEvent()
WireOutstartEvent in interface WireOut@NotNull public ValueOut getValueOut()
WireOutgetValueOut in interface WireOut@NotNull public ObjectOutput objectOutput()
objectOutput in interface WireOut@NotNull public WireOut writeComment(CharSequence s)
writeComment in interface WireOut@NotNull public WireOut addPadding(int paddingToAdd)
addPadding in interface WireOut@NotNull public WireOut headerNumber(long headerNumber)
headerNumber in interface WireCommonpublic long headerNumber()
headerNumber in interface WireCommon@NotNull public DocumentContext writingDocument(boolean metaData)
WireOutwritingDocument in interface MarshallableOutwritingDocument in interface WireOutmetaData - if true the document context will be used for writing meta data,
otherwise datapublic long writeHeaderOfUnknownLength(int safeLength,
long timeout,
TimeUnit timeUnit,
@Nullable
net.openhft.chronicle.core.values.LongValue lastPosition,
Sequence sequence)
WireOutwriteHeaderOfUnknownLength in interface WireOuttimeout - throw a TimeoutException if the header could not be written in this
time.timeUnit - of the timeOutlastPosition - the last known positionpublic long enterHeader(int safeLength)
enterHeader in interface WireOutpublic void updateHeader(long position,
boolean metaData,
int expectedHeader)
updateHeader in interface WireOutpublic 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 void 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 wire@NotNull public net.openhft.chronicle.bytes.Bytes<?> bytes()
bytes in interface WireCommonpublic net.openhft.chronicle.bytes.BytesComment<?> bytesComment()
bytesComment in interface WireCommon@NotNull public net.openhft.chronicle.core.values.IntValue newIntReference()
newIntReference in interface WireCommon@NotNull public net.openhft.chronicle.core.values.LongValue newLongReference()
newLongReference in interface WireCommon@NotNull public net.openhft.chronicle.core.values.BooleanValue newBooleanReference()
newBooleanReference in interface WireCommonpublic boolean isTextWire()
isTextWire in interface WireCommon@NotNull public net.openhft.chronicle.core.values.LongArrayValues newLongArrayReference()
newLongArrayReference in interface WireCommon@NotNull public net.openhft.chronicle.threads.Pauser pauser()
pauser in interface WireCommonpublic void pauser(net.openhft.chronicle.threads.Pauser pauser)
pauser in interface WireCommonpauser - to use for blocking operations.Copyright © 2019. All rights reserved.