Package io.mats3.serial.impl
Class MatsTraceFieldImpl.CallImpl<Z>
java.lang.Object
io.mats3.serial.impl.MatsTraceFieldImpl.CallImpl<Z>
- All Implemented Interfaces:
MatsTrace.Call<Z>
,Cloneable
- Enclosing class:
- MatsTraceFieldImpl<Z>
public static class MatsTraceFieldImpl.CallImpl<Z>
extends Object
implements MatsTrace.Call<Z>, Cloneable
Represents an entry in the
MatsTrace
.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.mats3.serial.MatsTrace.Call
MatsTrace.Call.CallType, MatsTrace.Call.Channel, MatsTrace.Call.MessagingModel
-
Method Summary
Modifier and TypeMethodDescriptionprotected MatsTraceFieldImpl.CallImpl<Z>
clone()
long
getData()
getFrom()
long
int
getTo()
setDebugInfo
(String callingAppName, String callingAppVersion, String callingHost, String debugInfo) Can only be set once.toString()
toStringFromMatsTrace
(long startTimestamp, int maxStackSize, int maxToStageIdLength, boolean printNulLData)
-
Method Details
-
setDebugInfo
public MatsTraceFieldImpl.CallImpl<Z> setDebugInfo(String callingAppName, String callingAppVersion, String callingHost, String debugInfo) Description copied from interface:MatsTrace.Call
Can only be set once.- Specified by:
setDebugInfo
in interfaceMatsTrace.Call<Z>
-
getCallingAppName
- Specified by:
getCallingAppName
in interfaceMatsTrace.Call<Z>
-
getCallingAppVersion
- Specified by:
getCallingAppVersion
in interfaceMatsTrace.Call<Z>
-
getCallingHost
- Specified by:
getCallingHost
in interfaceMatsTrace.Call<Z>
-
getCalledTimestamp
public long getCalledTimestamp()- Specified by:
getCalledTimestamp
in interfaceMatsTrace.Call<Z>
-
getMatsMessageId
- Specified by:
getMatsMessageId
in interfaceMatsTrace.Call<Z>
- Returns:
- the Mats Message Id, a guaranteed-globally-unique id for this particular message - it SHALL be
constructed as follows:
MatsTrace.getFlowId()
+ "_" + flow-unique messageId.
-
getDebugInfo
- Specified by:
getDebugInfo
in interfaceMatsTrace.Call<Z>
-
getCallType
- Specified by:
getCallType
in interfaceMatsTrace.Call<Z>
-
getReplyFromSpanId
public long getReplyFromSpanId()- Specified by:
getReplyFromSpanId
in interfaceMatsTrace.Call<Z>
- Returns:
- when
MatsTrace.Call.getCallType()
isREPLY
, the value of the REQUEST's SpanId is returned, otherwise anIllegalStateException
is thrown.
-
getFrom
- Specified by:
getFrom
in interfaceMatsTrace.Call<Z>
- Returns:
- the stageId that sent this call - will most probably be the string
"-nulled-"
for any other Call than theMatsTrace.getCurrentCall()
, to conserve space in the MatsTrace. The rationale for this, is that if those Calls are available, they are there for debug purposes only, and then you can use the order of the Calls to see who is the caller: The previous Call's"to"
is the"from"
of this Call.
-
getTo
- Specified by:
getTo
in interfaceMatsTrace.Call<Z>
- Returns:
- the endpointId/stageId this Call concerns, wrapped in a
MatsTrace.Call.Channel
to also specify theMatsTrace.Call.MessagingModel
in use.
-
getData
- Specified by:
getData
in interfaceMatsTrace.Call<Z>
-
getReplyStack
- Specified by:
getReplyStack
in interfaceMatsTrace.Call<Z>
- Returns:
- a COPY of the stack.
-
getReplyStackHeight
public int getReplyStackHeight()- Specified by:
getReplyStackHeight
in interfaceMatsTrace.Call<Z>
- Returns:
- the stack height of this Call - which is the number of elements below this call. I.e. for a
REPLY
to a Terminator, the stack is of size 0 (there are no more elements to REPLY to), while for the firstREQUEST
from an initiator, the stack is of size 1 (the endpointId for the Terminator is the one element below this Call).
-
toString
-
toStringFromMatsTrace
public String toStringFromMatsTrace(long startTimestamp, int maxStackSize, int maxToStageIdLength, boolean printNulLData) -
clone
-