Package com.yahoo.processing.execution
Class Execution.Trace
java.lang.Object
com.yahoo.processing.execution.Execution.Trace
- Enclosing class:
- Execution
Tre trace of this execution. This is a facade into a node in the larger trace tree which captures
the information about all executions caused by some request
- Author:
- bratseth
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Defines what information is added at which trace levelstatic class
An immutable access log value added to the trace -
Method Summary
Modifier and TypeMethodDescription<VISITOR extends com.yahoo.yolean.trace.TraceVisitor>
VISITORaccept
(VISITOR visitor) Visits the entire trace treeCreates a trace node below a parentstatic Execution.Trace
createRoot
(int traceLevel) Creates an empty root trace with a given level of tracingboolean
getProperty
(String name) Returns a property set anywhere in the trace tree this points to.int
Returns the maximum trace level this will recordvoid
Adds a key-value which will be logged to the access log of this request.Returns the values that should be written to the access log set in the entire trace node treevoid
setForceTimestamps
(boolean forceTimestamps) void
setProperty
(String name, Object value) Adds a property key-value to this trace.void
setTraceLevel
(int traceLevel) Sets the maximum trace level this will recordtoString()
Returns a short string description of thisvoid
void
Adds a trace message to this trace, if this trace has at most the given trace levelcom.yahoo.yolean.trace.TraceNode
Returns the trace node peer of this
-
Method Details
-
createRoot
Creates an empty root trace with a given level of tracing -
createChild
Creates a trace node below a parent -
getTraceLevel
public int getTraceLevel()Returns the maximum trace level this will record -
setTraceLevel
public void setTraceLevel(int traceLevel) Sets the maximum trace level this will record -
setForceTimestamps
public void setForceTimestamps(boolean forceTimestamps) -
getForceTimestamps
public boolean getForceTimestamps() -
trace
Adds a trace message to this trace, if this trace has at most the given trace level -
trace
-
logValue
Adds a key-value which will be logged to the access log of this request. Multiple values may be set to the same key. A value cannot be removed once set, but it can be overwritten by adding another value for the same key. -
logValueIterator
Returns the values that should be written to the access log set in the entire trace node tree -
accept
public <VISITOR extends com.yahoo.yolean.trace.TraceVisitor> VISITOR accept(VISITOR visitor) Visits the entire trace tree- Returns:
- the argument visitor for convenience
-
setProperty
Adds a property key-value to this trace. Values are looked up by reverse depth-first search in the trace node tree.- Parameters:
name
- the name of the propertyvalue
- the value of the property, or null to set this property to null
-
getProperty
Returns a property set anywhere in the trace tree this points to. Note that even though this call is itself "thread robust", the object values returned may in some scenarios not be written behind a synchronization barrier, so when accessing objects which are not inherently thread safe, synchronization should be considered.This method have a time complexity which is proportional to the number of trace nodes in the tree
- Returns:
- the value of this property, or null if none
-
traceNode
public com.yahoo.yolean.trace.TraceNode traceNode()Returns the trace node peer of this -
toString
Returns a short string description of this
-