diff --git a/src/java.management/share/classes/java/lang/management/MonitorInfo.java b/src/java.management/share/classes/java/lang/management/MonitorInfo.java index c57c21a51ec..453e1a2bb9d 100644 --- a/src/java.management/share/classes/java/lang/management/MonitorInfo.java +++ b/src/java.management/share/classes/java/lang/management/MonitorInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -116,11 +116,10 @@ public class MonitorInfo extends LockInfo { *
*CompositeData as specified in the
- * stackTrace
- * attribute defined in the {@link ThreadInfo#from
- * ThreadInfo.from} method.
- *
+ * A {@code CompositeData} representing {@code ThreadInfo} of + * version N contains {@code "stackTrace"} attribute and + * {@code "lockedMonitors"} attribute representing + * an array of {@code StackTraceElement} and + * an array of {@link MonitorInfo} respectively + * and their types are of version N. + * The {@code "lockedStackFrame"} attribute in + * {@link MonitorInfo#from(CompositeData) MonitorInfo}'s composite type + * must represent {@code StackTraceElement} of the same version N. + * Otherwise, this method will throw {@code IllegalArgumentException}. + * *
Attribute Name | *Type | + *Since | *||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
threadId | *{@code java.lang.Long} | + *5 | *||||||||||||||||
threadName | *{@code java.lang.String} | + *5 | *||||||||||||||||
threadState | *{@code java.lang.String} | + *5 | *||||||||||||||||
suspended | *{@code java.lang.Boolean} | + *5 | *||||||||||||||||
inNative | *{@code java.lang.Boolean} | + *5 | *||||||||||||||||
blockedCount | *{@code java.lang.Long} | + *5 | *||||||||||||||||
blockedTime | *{@code java.lang.Long} | + *5 | *||||||||||||||||
waitedCount | *{@code java.lang.Long} | + *5 | *||||||||||||||||
waitedTime | *{@code java.lang.Long} | + *5 | + *||||||||||||||||
lockName | + *{@code java.lang.String} | + *5 | + *||||||||||||||||
lockOwnerId | + *{@code java.lang.Long} | + *5 | + *||||||||||||||||
lockOwnerName | + *{@code java.lang.String} | + *5 | + *||||||||||||||||
stackTrace | + *{@code javax.management.openmbean.CompositeData[]}, each element + * is a {@code CompositeData} representing {@code StackTraceElement} + * as specified below. + * | + *5 | *||||||||||||||||
lockInfo | @@ -745,78 +773,21 @@ public class ThreadInfo { * - the mapped type for {@link LockInfo} as specified in the * {@link LockInfo#from} method. *||||||||||||||||||
lockName | - *{@code java.lang.String} | - *|||||||||||||||||
lockOwnerId | - *{@code java.lang.Long} | - *|||||||||||||||||
lockOwnerName | - *{@code java.lang.String} | - *|||||||||||||||||
stackTrace | - *{@code javax.management.openmbean.CompositeData[]}
- * - * Each element is a {@code CompositeData} representing - * StackTraceElement containing the following attributes: - *
|
+ * the value of the {@code lockName} attribute.
+ * 6 | *||||||||||||||||
lockedMonitors | *{@code javax.management.openmbean.CompositeData[]}
* whose element type is the mapped type for
* {@link MonitorInfo} as specified in the
- * {@link MonitorInfo#from Monitor.from} method.
+ * {@link MonitorInfo#from MonitorInfo.from} method.
* - * If {@code cd} does not contain this attribute, - * this attribute will be set to an empty array. |
+ * If the given {@code CompositeData} does not contain this attribute,
+ * this attribute will be set to an empty array.
+ * 6 | *||||||||||||||||
lockedSynchronizers | @@ -824,25 +795,93 @@ public class ThreadInfo { * whose element type is the mapped type for * {@link LockInfo} as specified in the {@link LockInfo#from} method. *6 | *|||||||||||||||||
daemon | - *{@code java.lang.Boolean} | + *{@code java.lang.Boolean}
+ * + * If the given {@code CompositeData} does not contain this attribute, + * this attribute will be set to {@code false}. |
+ * 9 | *|||||||||||||||
priority | + *{@code java.lang.Integer}
+ * + * If the given {@code CompositeData} does not contain this attribute, + * This attribute will be set to {@link Thread#NORM_PRIORITY}. |
+ * 9 | + *
Attribute Name | + *Type | + *Since | + *
---|---|---|
classLoaderName | + *{@code java.lang.String} | + *9 | + *
moduleName | + *{@code java.lang.String} | + *9 | + *
moduleVersion | + *{@code java.lang.String} | + *9 | + *
className | + *{@code java.lang.String} | + *5 | + *
methodName | + *{@code java.lang.String} | + *5 | + *
fileName | + *{@code java.lang.String} | + *5 | + *
lineNumber | *{@code java.lang.Integer} | + *5 | + *
nativeMethod | + *{@code java.lang.Boolean} | + *5 | *