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>,java.lang.Cloneable
- Enclosing class:
- MatsTraceFieldImpl<Z>
public static class MatsTraceFieldImpl.CallImpl<Z> extends java.lang.Object implements MatsTrace.Call<Z>, java.lang.Cloneable
Represents an entry in theMatsTrace.
-
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MatsTraceFieldImpl.CallImpl<Z>clone()longgetCalledTimestamp()java.lang.StringgetCallingAppName()java.lang.StringgetCallingAppVersion()java.lang.StringgetCallingHost()MatsTrace.Call.CallTypegetCallType()ZgetData()java.lang.StringgetDebugInfo()java.lang.StringgetFrom()java.lang.StringgetMatsMessageId()longgetReplyFromSpanId()java.util.List<MatsTrace.Call.Channel>getReplyStack()intgetReplyStackHeight()MatsTrace.Call.ChannelgetTo()MatsTraceFieldImpl.CallImpl<Z>setDebugInfo(java.lang.String callingAppName, java.lang.String callingAppVersion, java.lang.String callingHost, java.lang.String debugInfo)Can only be set once.java.lang.StringtoString()java.lang.StringtoStringFromMatsTrace(long startTimestamp, int maxStackSize, int maxToStageIdLength, boolean printNulLData)
-
-
-
Method Detail
-
setDebugInfo
public MatsTraceFieldImpl.CallImpl<Z> setDebugInfo(java.lang.String callingAppName, java.lang.String callingAppVersion, java.lang.String callingHost, java.lang.String debugInfo)
Description copied from interface:MatsTrace.CallCan only be set once.- Specified by:
setDebugInfoin interfaceMatsTrace.Call<Z>
-
getCallingAppName
public java.lang.String getCallingAppName()
- Specified by:
getCallingAppNamein interfaceMatsTrace.Call<Z>
-
getCallingAppVersion
public java.lang.String getCallingAppVersion()
- Specified by:
getCallingAppVersionin interfaceMatsTrace.Call<Z>
-
getCallingHost
public java.lang.String getCallingHost()
- Specified by:
getCallingHostin interfaceMatsTrace.Call<Z>
-
getCalledTimestamp
public long getCalledTimestamp()
- Specified by:
getCalledTimestampin interfaceMatsTrace.Call<Z>
-
getMatsMessageId
public java.lang.String getMatsMessageId()
- Specified by:
getMatsMessageIdin 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
public java.lang.String getDebugInfo()
- Specified by:
getDebugInfoin interfaceMatsTrace.Call<Z>
-
getCallType
public MatsTrace.Call.CallType getCallType()
- Specified by:
getCallTypein interfaceMatsTrace.Call<Z>
-
getReplyFromSpanId
public long getReplyFromSpanId()
- Specified by:
getReplyFromSpanIdin interfaceMatsTrace.Call<Z>- Returns:
- when
MatsTrace.Call.getCallType()isREPLY, the value of the REQUEST's SpanId is returned, otherwise anIllegalStateExceptionis thrown.
-
getFrom
public java.lang.String getFrom()
- Specified by:
getFromin 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
public MatsTrace.Call.Channel getTo()
- Specified by:
getToin interfaceMatsTrace.Call<Z>- Returns:
- the endpointId/stageId this Call concerns, wrapped in a
MatsTrace.Call.Channelto also specify theMatsTrace.Call.MessagingModelin use.
-
getData
public Z getData()
- Specified by:
getDatain interfaceMatsTrace.Call<Z>
-
getReplyStack
public java.util.List<MatsTrace.Call.Channel> getReplyStack()
- Specified by:
getReplyStackin interfaceMatsTrace.Call<Z>- Returns:
- a COPY of the stack.
-
getReplyStackHeight
public int getReplyStackHeight()
- Specified by:
getReplyStackHeightin interfaceMatsTrace.Call<Z>- Returns:
- the stack height of this Call - which is the number of elements below this call. I.e. for a
REPLYto a Terminator, the stack is of size 0 (there are no more elements to REPLY to), while for the firstREQUESTfrom an initiator, the stack is of size 1 (the endpointId for the Terminator is the one element below this Call).
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringFromMatsTrace
public java.lang.String toStringFromMatsTrace(long startTimestamp, int maxStackSize, int maxToStageIdLength, boolean printNulLData)
-
clone
protected MatsTraceFieldImpl.CallImpl<Z> clone()
- Overrides:
clonein classjava.lang.Object
-
-