| |
|
| java.lang.Object java.lang.management.LockInfo java.lang.management.MonitorInfo
MonitorInfo | public class MonitorInfo extends LockInfo (Code) | | Information about an object monitor lock. An object monitor is locked
when entering a synchronization block or method on that object.
MXBean Mapping
MonitorInfo is mapped to a
CompositeData CompositeData with attributes as specified in
the
MonitorInfo.from from method.
author: Mandy Chung version: 1.11, 05/05/07 since: 1.6 |
Method Summary | |
public static MonitorInfo | from(CompositeData cd) Returns a MonitorInfo object represented by the
given CompositeData.
The given CompositeData must contain the following attributes
as well as the attributes specified in the
mapped type for the
LockInfo class:
Attribute Name |
Type |
lockedStackFrame |
CompositeData as specified in the
stackTrace
attribute defined in the
ThreadInfo.fromThreadInfo.from method.
|
lockedStackDepth |
java.lang.Integer |
Parameters: cd - CompositeData representing a MonitorInfo throws: IllegalArgumentException - if cd does notrepresent a MonitorInfo with the attributes describedabove. | public int | getLockedStackDepth() Returns the depth in the stack trace where the object monitor
was locked. | public StackTraceElement | getLockedStackFrame() Returns the stack frame that locked the object monitor. |
MonitorInfo | public MonitorInfo(String className, int identityHashCode, int stackDepth, StackTraceElement stackFrame)(Code) | | Construct a MonitorInfo object.
Parameters: className - the fully qualified name of the class of the lock object. Parameters: identityHashCode - the System.identityHashCodeidentity hash code of the lock object. Parameters: stackDepth - the depth in the stack trace where the object monitorwas locked. Parameters: stackFrame - the stack frame that locked the object monitor. throws: IllegalArgumentException - if stackDepth ≥ 0 but stackFrame is null,or stackDepth < 0 but stackFrame is notnull. |
from | public static MonitorInfo from(CompositeData cd)(Code) | | Returns a MonitorInfo object represented by the
given CompositeData.
The given CompositeData must contain the following attributes
as well as the attributes specified in the
mapped type for the
LockInfo class:
Attribute Name |
Type |
lockedStackFrame |
CompositeData as specified in the
stackTrace
attribute defined in the
ThreadInfo.fromThreadInfo.from method.
|
lockedStackDepth |
java.lang.Integer |
Parameters: cd - CompositeData representing a MonitorInfo throws: IllegalArgumentException - if cd does notrepresent a MonitorInfo with the attributes describedabove. a MonitorInfo object representedby cd if cd is not null;null otherwise. |
getLockedStackDepth | public int getLockedStackDepth()(Code) | | Returns the depth in the stack trace where the object monitor
was locked. The depth is the index to the StackTraceElement
array returned in the
ThreadInfo.getStackTrace method.
the depth in the stack trace where the object monitorwas locked, or a negative number if not available. |
getLockedStackFrame | public StackTraceElement getLockedStackFrame()(Code) | | Returns the stack frame that locked the object monitor.
StackTraceElement that locked the object monitor,or null if not available. |
|
|
|