public class MonitorInfo extends LockInfo
| Constructor and Description |
|---|
MonitorInfo(String className,
int identityHashCode,
int stackDepth,
StackTraceElement stackFrame)
Creates a new
MonitorInfo instance. |
| Modifier and Type | Method and Description |
|---|---|
static MonitorInfo |
from(CompositeData cd)
Receives a
CompositeData representing a MonitorInfo
object and attempts to return the root MonitorInfo
instance. |
int |
getLockedStackDepth()
Returns an integer which is the number of frames deep into the stack
where the monitor locking took place.
|
StackTraceElement |
getLockedStackFrame()
The complete
StackTraceElement in which the monitor was locked. |
getClassName, getIdentityHashCode, toStringpublic MonitorInfo(String className, int identityHashCode, int stackDepth, StackTraceElement stackFrame)
MonitorInfo instance.className - the name (including the package prefix) of the associated
monitor lock object's classidentityHashCode - the value of the associated monitor lock object's identity
hash code. This amounts to the result of calling
System.identityHashCode(Object) with the monitor lock
object as the sole argument.stackDepth - the number of frames deep in the stack where the locking of
the monitor took placestackFrame - the complete stack frame at which the locking of the monitor
occurredIllegalArgumentException - if either of the following two conditions apply:
stackFrame is non-null
yet the value of stackDepth is less than zero
stackFrame is
null yet the value of stackDepth
is zero or greater
public int getLockedStackDepth()
public StackTraceElement getLockedStackFrame()
StackTraceElement in which the monitor was locked.StackTraceElement in which the associated
monitor was lockedpublic static MonitorInfo from(CompositeData cd)
CompositeData representing a MonitorInfo
object and attempts to return the root MonitorInfo
instance.cd - a CompositeData that represents a
MonitorInfo.cd is non- null, returns a new
instance of MonitorInfo. If cd is
null, returns null.IllegalArgumentException - if argument cd does not correspond to a
MonitorInfo with the expected attributes of a
LockInfo - className(java.lang.String)
and identityHashCode(java.lang.Integer) -
plus the following:
lockedStackFrame(javax.management.openmbean.CompositeData)
lockedStackDepth(
java.lang.Integer)
lockedStackFrame attribute must correspond
to a java.lang.StackTraceElement which has the
following attributes:
className (java.lang.String)
methodName (java.lang.String)
fileName (java.lang.String)
lineNumber (java.lang.Integer)
nativeMethod (java.lang.Boolean)
Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 1993, 2025 IBM Corp. and others.
DRAFT internal-b00