This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.lang.management
class MonitorInfo

java.lang.Object extended by java.lang.management.LockInfo extended by java.lang.management.MonitorInfo

public class MonitorInfo
extends LockInfo

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 {@link CompositeData CompositeData} with attributes as specified in the {@link #from from} method.


Constructor Summary
MonitorInfo(String className, int identityHashCode, int stackDepth, StackTraceElement stackFrame)

          Construct a MonitorInfo object.
 
Method Summary
static MonitorInfo

          Returns a MonitorInfo object represented by the given CompositeData.
 int

          Returns the depth in the stack trace where the object monitor was locked.
 StackTraceElement

          Returns the stack frame that locked the object monitor.
 
Methods inherited from class java.lang.management.LockInfo
getClassName, getIdentityHashCode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitorInfo

public MonitorInfo(String className,
                   int identityHashCode,
                   int stackDepth,
                   StackTraceElement stackFrame)
Construct a MonitorInfo object.

Parameters:
className - the fully qualified name of the class of the lock object.
identityHashCode - the {@link System#identityHashCode identity hash code} of the lock object.
stackDepth - the depth in the stack trace where the object monitor was locked.
stackFrame - the stack frame that locked the object monitor.
Method Detail

from

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 {@link LockInfo} class:
Attribute Name Type
lockedStackFrame CompositeData as specified in the stackTrace attribute defined in the {@link ThreadInfo#from ThreadInfo.from} method.
lockedStackDepth java.lang.Integer

Parameters:
cd - CompositeData representing a MonitorInfo
Returns:
a MonitorInfo object represented by cd if cd is not null; null otherwise.

getLockedStackDepth

public int getLockedStackDepth()
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 {@link ThreadInfo#getStackTrace} method.

Returns:
the depth in the stack trace where the object monitor was locked, or a negative number if not available.

getLockedStackFrame

public StackTraceElement getLockedStackFrame()
Returns the stack frame that locked the object monitor.

Returns:
StackTraceElement that locked the object monitor, or null if not available.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.