public class HashWire extends Object implements WireOut
| Constructor and Description |
|---|
HashWire() |
| Modifier and Type | Method and Description |
|---|---|
WireOut |
addPadding(int paddingToAdd) |
net.openhft.chronicle.bytes.Bytes<?> |
bytes() |
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.
|
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) |
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(int length,
long position,
boolean metaData)
Change the header from NOT_COMPLETE | length to metaData * META_DATA | length.
|
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 |
writeHeader(int length,
int safeLength,
long timeout,
TimeUnit timeUnit,
net.openhft.chronicle.core.values.LongValue lastPosition) |
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, writeEventName, writeEventName, writeHeader, writeHeader, writeNotCompleteDocument, writingDocumentnotCompleteIsNotPresent, notCompleteIsNotPresentpublic 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 WireOutmetaData - if true the document context will be used for writing meta data,
otherwise datapublic long writeHeader(int length,
int safeLength,
long timeout,
TimeUnit timeUnit,
@Nullable
net.openhft.chronicle.core.values.LongValue lastPosition)
throws TimeoutException,
EOFException
writeHeader in interface WireOutTimeoutExceptionEOFExceptionpublic void updateHeader(int length,
long position,
boolean metaData)
throws StreamCorruptedException
WireOutupdateHeader in interface WireOutlength - provided to make the header, note this can be larger than the message
actually used.position - returned by writeHeadermetaData - whether the message is meta data or not.StreamCorruptedException - if the steam has become corruptedpublic 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)
throws TimeoutException
WireOutwriteEndOfWire in interface WireOuttimeout - throw TimeoutException if it could not write the marker in time.timeUnit - of the timeoutlastPosition - the end of the wireTimeoutException - timeout exceeded.@NotNull public net.openhft.chronicle.bytes.Bytes<?> bytes()
bytes 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.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 © 2017. All rights reserved.