org.jboss.dashboard.profiler
Class CodeBlockTrace
java.lang.Object
org.jboss.dashboard.profiler.CodeBlockTrace
- Direct Known Subclasses:
- ErrorTrace, SQLStatementTrace
public abstract class CodeBlockTrace
- extends Object
A code block trace is the way that the platform has to register the execution of a given portion of code (code block).
Such registry contains:
- A reference to the belonging thread.
- The begin/end times of the code block.
- A map of variables representing the execution context.
- A parent trace.
- A set of child traces.
|
Method Summary |
void |
addChild(CodeBlockTrace child)
|
void |
addRuntimeConstraint(RuntimeConstraint runtimeConstraint)
|
CodeBlockTrace |
begin()
|
void |
checkRuntimeConstraints()
|
void |
end()
|
boolean |
equals(Object obj)
|
Set<CodeBlockType> |
getAncestorTypes()
|
long |
getBeginTimeMillis()
|
CodeBlockTraces |
getChildren()
|
long |
getChildrenElapsedTimeMillis()
|
abstract Map<String,Object> |
getContext()
|
CodeBlockTraces |
getDescendants()
|
abstract String |
getDescription()
|
long |
getElapsedTimeMillis()
|
long |
getEndTimeMillis()
|
String |
getId()
|
int |
getLevel()
|
CodeBlockTrace |
getParent()
|
long |
getSelfTimeMillis()
|
ThreadProfile |
getThreadProfile()
|
abstract CodeBlockType |
getType()
|
int |
hashCode()
|
boolean |
isDescendantOfType(CodeBlockType type)
|
boolean |
isRunning()
|
String |
printContext(boolean includeParent)
|
String |
printContext(boolean includeParent,
String valueSeparator,
String rowSeparator)
|
String |
printContext(boolean includeParent,
String valueSeparator,
String rowSeparator,
int indent)
|
void |
printIndent(StringBuffer buf,
int indent)
|
String |
printMap(Map m,
String valueSeparator,
String rowSeparator)
|
String |
printMap(Map m,
String valueSeparator,
String rowSeparator,
int indent)
|
void |
removeChild(CodeBlockTrace child)
|
void |
setAncestorTypes(Set<CodeBlockType> ancestorTypes)
|
void |
setBeginTimeMillis(long beginTimeMillis)
|
void |
setChildren(CodeBlockTraces children)
|
void |
setEndTimeMillis(long endTimeMillis)
|
void |
setId(String id)
|
void |
setParent(CodeBlockTrace parent)
|
void |
setThreadProfile(ThreadProfile threadProfile)
|
CodeBlockTraces |
toPlainList()
|
String |
toString()
|
dateFormat
protected static DateFormat dateFormat
RUNTIME_CONTRAINTS_ENABLED
public static boolean RUNTIME_CONTRAINTS_ENABLED
parent
protected CodeBlockTrace parent
children
protected CodeBlockTraces children
id
protected String id
beginTimeMillis
protected long beginTimeMillis
endTimeMillis
protected long endTimeMillis
childrenElapsedTimeMillis
protected long childrenElapsedTimeMillis
ancestorTypes
protected Set<CodeBlockType> ancestorTypes
runtimeConstraints
protected List<RuntimeConstraint> runtimeConstraints
CodeBlockTrace
public CodeBlockTrace(String id)
getType
public abstract CodeBlockType getType()
getDescription
public abstract String getDescription()
getContext
public abstract Map<String,Object> getContext()
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
getThreadProfile
public ThreadProfile getThreadProfile()
setThreadProfile
public void setThreadProfile(ThreadProfile threadProfile)
getParent
public CodeBlockTrace getParent()
setParent
public void setParent(CodeBlockTrace parent)
getChildren
public CodeBlockTraces getChildren()
setChildren
public void setChildren(CodeBlockTraces children)
getAncestorTypes
public Set<CodeBlockType> getAncestorTypes()
setAncestorTypes
public void setAncestorTypes(Set<CodeBlockType> ancestorTypes)
isDescendantOfType
public boolean isDescendantOfType(CodeBlockType type)
addChild
public void addChild(CodeBlockTrace child)
removeChild
public void removeChild(CodeBlockTrace child)
getDescendants
public CodeBlockTraces getDescendants()
getLevel
public int getLevel()
toPlainList
public CodeBlockTraces toPlainList()
getId
public String getId()
setId
public void setId(String id)
getBeginTimeMillis
public long getBeginTimeMillis()
setBeginTimeMillis
public void setBeginTimeMillis(long beginTimeMillis)
getEndTimeMillis
public long getEndTimeMillis()
setEndTimeMillis
public void setEndTimeMillis(long endTimeMillis)
getElapsedTimeMillis
public long getElapsedTimeMillis()
getSelfTimeMillis
public long getSelfTimeMillis()
getChildrenElapsedTimeMillis
public long getChildrenElapsedTimeMillis()
isRunning
public boolean isRunning()
begin
public CodeBlockTrace begin()
end
public void end()
toString
public String toString()
- Overrides:
toString in class Object
printContext
public String printContext(boolean includeParent)
printContext
public String printContext(boolean includeParent,
String valueSeparator,
String rowSeparator)
printContext
public String printContext(boolean includeParent,
String valueSeparator,
String rowSeparator,
int indent)
printIndent
public void printIndent(StringBuffer buf,
int indent)
printMap
public String printMap(Map m,
String valueSeparator,
String rowSeparator)
printMap
public String printMap(Map m,
String valueSeparator,
String rowSeparator,
int indent)
addRuntimeConstraint
public void addRuntimeConstraint(RuntimeConstraint runtimeConstraint)
checkRuntimeConstraints
public void checkRuntimeConstraints()
throws Exception
- Throws:
Exception
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.