public interface MessageHistory extends Marshallable
EMPTYDISCARD| Modifier and Type | Method and Description |
|---|---|
static void |
clear()
Effectively calls
set(null) removing the current thread-local
history. |
default void |
doWriteHistory(DocumentContext dc)
Default implementation for recording history into the supplied
DocumentContext. |
static void |
emptyHistory()
Sets the current thread-local history to a new empty
VanillaMessageHistory. |
static MessageHistory |
get()
Retrieves the thread-local
MessageHistory instance for the
message being processed. |
boolean |
isDirty() |
int |
lastSourceId()
Returns the last source id contained in this
MessageHistory. |
long |
lastSourceIndex()
Returns the last source index contained in this
MessageHistory. |
void |
reset()
Clears all recorded source and timing entries.
|
void |
reset(int sourceId,
long sourceIndex)
Resets the
MessageHistory with the provided sourceId
and sourceIndex as a starting point. |
static void |
set(MessageHistory md)
You only need to call this if you wish to override its behaviour.
|
int |
sourceId(int n)
Returns the source id at a position specified by the input
n. |
boolean |
sourceIdsEndsWith(int[] sourceIds)
Returns
true if the source ids contained in this
MessageHistory end with the provided sourceIds. |
long |
sourceIndex(int n)
Returns the index of the source at a position specified by the
input
n. |
int |
sources()
Returns the number of sources contained in this
MessageHistory. |
long |
timing(int n)
Returns a timing at a position specified by the input
n. |
int |
timings()
Returns the number of timings contained in this
MessageHistory. |
static void |
writeHistory(DocumentContext dc)
Writes the current thread's history to the given document if the
document is empty.
|
$equals, $fieldInfoMap, $fieldInfos, $hashCode, $toString, className, copyTo, deepCopy, fromFile, fromFile, fromString, fromString, fromString, getField, getLongField, mergeToMap, readMarshallable, setField, setLongField, streamFromFile, streamFromFile, writeMarshallablebinaryLengthLength, writeValueunexpectedFieldstatic MessageHistory get()
MessageHistory instance for the
message being processed.static void set(MessageHistory md)
md - to change to the default implementation for this thread. Null to clear the thread local
and force withInitial to be called againstatic void clear()
set(null) removing the current thread-local
history.static void emptyHistory()
VanillaMessageHistory.@UsedViaReflection static void writeHistory(DocumentContext dc)
dc - the DocumentContext to write the history todefault void doWriteHistory(DocumentContext dc)
DocumentContext. It writes an event named
MethodReader.HISTORY with this history
as the value.dc - the document to append the history toint timings()
MessageHistory.MessageHistory.long timing(int n)
n.n.int sources()
MessageHistory.MessageHistory.int sourceId(int n)
n.n.boolean sourceIdsEndsWith(int[] sourceIds)
true if the source ids contained in this
MessageHistory end with the provided sourceIds.true if the source ids contained in this
MessageHistory end with the provided sourceIds.long sourceIndex(int n)
n.n.void reset()
reset in interface Marshallablereset in interface net.openhft.chronicle.core.io.Resettablevoid reset(int sourceId,
long sourceIndex)
MessageHistory with the provided sourceId
and sourceIndex as a starting point.int lastSourceId()
MessageHistory.MessageHistory.long lastSourceIndex()
MessageHistory.MessageHistory.boolean isDirty()
true if the message history has not been written using
Marshallable.writeMarshallable(net.openhft.chronicle.wire.WireOut)Copyright © 2026 Chronicle Software Ltd. All rights reserved.