Package kieker.common.record.flow.trace
Class TraceMetadata
java.lang.Object
kieker.common.record.AbstractMonitoringRecord
kieker.common.record.flow.trace.TraceMetadata
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<IMonitoringRecord>
,IFlowRecord
,IMonitoringRecord
- Direct Known Subclasses:
ApplicationTraceMetadata
public class TraceMetadata extends AbstractMonitoringRecord implements IFlowRecord
- Since:
- 1.5
- Author:
- Jan Waller API compatibility: Kieker 1.15.0
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
HOSTNAME
static int
NEXT_ORDER_ID
static java.lang.String
NO_HOSTNAME
static int
NO_PARENT_ORDER_INDEX
static long
NO_PARENT_TRACEID
user-defined constants.static java.lang.String
NO_SESSION_ID
static int
PARENT_ORDER_ID
static long
PARENT_TRACE_ID
static java.lang.String
SESSION_ID
static int
SIZE
Descriptive definition of the serialization size of the record.static long
THREAD_ID
static long
TRACE_ID
default constants.static java.lang.Class<?>[]
TYPES
static java.lang.String[]
VALUE_NAMES
property name array.Fields inherited from class kieker.common.record.AbstractMonitoringRecord
TYPE_SIZE_BOOLEAN, TYPE_SIZE_BYTE, TYPE_SIZE_CHARACTER, TYPE_SIZE_DOUBLE, TYPE_SIZE_FLOAT, TYPE_SIZE_INT, TYPE_SIZE_LONG, TYPE_SIZE_SHORT, TYPE_SIZE_STRING
-
Constructor Summary
Constructors Constructor Description TraceMetadata(long traceId, long threadId, java.lang.String sessionId, java.lang.String hostname, long parentTraceId, int parentOrderId)
Creates a new instance of this class using the given parameters.TraceMetadata(IValueDeserializer deserializer)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Performs a null-check, a this-check, and a class-check.java.lang.String
getHostname()
int
getNextOrderId()
int
getParentOrderId()
long
getParentTraceId()
java.lang.String
getSessionId()
int
getSize()
This method should deliver the size of a binary representation of this record.long
getThreadId()
long
getTraceId()
java.lang.String[]
getValueNames()
This method delivers an array containing the value names of the record.java.lang.Class<?>[]
getValueTypes()
This method delivers an array with the classes of the single values for the record.int
hashCode()
void
serialize(IValueSerializer serializer)
This method serializes this record using the given serializer.void
setTraceId(long traceId)
java.lang.String
toString()
Creates a string representation of this record.
This method should not be used for serialization purposes since this is not the purpose of Object's toString method.Methods inherited from class kieker.common.record.AbstractMonitoringRecord
checkArray, classForName, compareTo, createFromDeserializer, fromStringArrayToTypedArray2, getLoggingTimestamp, isNotEqual, isNotEqual, setLoggingTimestamp, typesForClass
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface kieker.common.record.IMonitoringRecord
getLoggingTimestamp, setLoggingTimestamp
-
Field Details
-
SIZE
public static final int SIZEDescriptive definition of the serialization size of the record.- See Also:
- Constant Field Values
-
TYPES
public static final java.lang.Class<?>[] TYPES -
NO_PARENT_TRACEID
public static final long NO_PARENT_TRACEIDuser-defined constants.- See Also:
- Constant Field Values
-
NO_PARENT_ORDER_INDEX
public static final int NO_PARENT_ORDER_INDEX- See Also:
- Constant Field Values
-
NO_SESSION_ID
public static final java.lang.String NO_SESSION_ID- See Also:
- Constant Field Values
-
NO_HOSTNAME
public static final java.lang.String NO_HOSTNAME- See Also:
- Constant Field Values
-
VALUE_NAMES
public static final java.lang.String[] VALUE_NAMESproperty name array. -
TRACE_ID
public static final long TRACE_IDdefault constants.- See Also:
- Constant Field Values
-
THREAD_ID
public static final long THREAD_ID- See Also:
- Constant Field Values
-
SESSION_ID
public static final java.lang.String SESSION_ID- See Also:
- Constant Field Values
-
HOSTNAME
public static final java.lang.String HOSTNAME- See Also:
- Constant Field Values
-
PARENT_TRACE_ID
public static final long PARENT_TRACE_ID- See Also:
- Constant Field Values
-
PARENT_ORDER_ID
public static final int PARENT_ORDER_ID- See Also:
- Constant Field Values
-
NEXT_ORDER_ID
public static final int NEXT_ORDER_ID- See Also:
- Constant Field Values
-
-
Constructor Details
-
TraceMetadata
public TraceMetadata(long traceId, long threadId, java.lang.String sessionId, java.lang.String hostname, long parentTraceId, int parentOrderId)Creates a new instance of this class using the given parameters.- Parameters:
traceId
- traceIdthreadId
- threadIdsessionId
- sessionIdhostname
- hostnameparentTraceId
- parentTraceIdparentOrderId
- parentOrderId
-
TraceMetadata
- Parameters:
deserializer
- The deserializer to use- Throws:
RecordInstantiationException
- when the record could not be deserialized
-
-
Method Details
-
serialize
This method serializes this record using the given serializer.- Specified by:
serialize
in interfaceIMonitoringRecord
- Parameters:
serializer
- The serializer to serialize the record with. *- Throws:
java.nio.BufferOverflowException
- If the underlying buffer has insufficient capacity to store this record
-
getValueTypes
public java.lang.Class<?>[] getValueTypes()This method delivers an array with the classes of the single values for the record.- Specified by:
getValueTypes
in interfaceIMonitoringRecord
- Returns:
- The types of the values. This returned array should be treated readonly.
-
getValueNames
public java.lang.String[] getValueNames()This method delivers an array containing the value names of the record.- Specified by:
getValueNames
in interfaceIMonitoringRecord
- Returns:
- The types of the values. This returned array should be treated readonly.
-
getSize
public int getSize()This method should deliver the size of a binary representation of this record.- Specified by:
getSize
in interfaceIMonitoringRecord
- Returns:
- The size.
-
equals
public boolean equals(java.lang.Object obj)Performs a null-check, a this-check, and a class-check. Moreover, it checks each attribute for equality.
- Overrides:
equals
in classAbstractMonitoringRecord
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractMonitoringRecord
-
getTraceId
public final long getTraceId() -
setTraceId
public final void setTraceId(long traceId) -
getThreadId
public final long getThreadId() -
getSessionId
public final java.lang.String getSessionId() -
getHostname
public final java.lang.String getHostname() -
getParentTraceId
public final long getParentTraceId() -
getParentOrderId
public final int getParentOrderId() -
getNextOrderId
public final int getNextOrderId() -
toString
public java.lang.String toString()Creates a string representation of this record.
This method should not be used for serialization purposes since this is not the purpose of Object's toString method.- Specified by:
toString
in interfaceIMonitoringRecord
- Overrides:
toString
in classjava.lang.Object
- Returns:
- A (human readable) string of this record.
-