equal
deleted
inserted
replaced
41 * {@link ReentrantLock ReentrantLock} and |
41 * {@link ReentrantLock ReentrantLock} and |
42 * {@link ReentrantReadWriteLock ReentrantReadWriteLock} are |
42 * {@link ReentrantReadWriteLock ReentrantReadWriteLock} are |
43 * two examples of ownable synchronizers provided by the platform. |
43 * two examples of ownable synchronizers provided by the platform. |
44 * |
44 * |
45 * <h3><a name="MappedType">MXBean Mapping</a></h3> |
45 * <h3><a name="MappedType">MXBean Mapping</a></h3> |
46 * <tt>LockInfo</tt> is mapped to a {@link CompositeData CompositeData} |
46 * {@code LockInfo} is mapped to a {@link CompositeData CompositeData} |
47 * as specified in the {@link #from from} method. |
47 * as specified in the {@link #from from} method. |
48 * |
48 * |
49 * @see java.util.concurrent.locks.AbstractOwnableSynchronizer |
49 * @see java.util.concurrent.locks.AbstractOwnableSynchronizer |
50 * @see java.util.concurrent.locks.Condition |
50 * @see java.util.concurrent.locks.Condition |
51 * |
51 * |
57 |
57 |
58 private String className; |
58 private String className; |
59 private int identityHashCode; |
59 private int identityHashCode; |
60 |
60 |
61 /** |
61 /** |
62 * Constructs a <tt>LockInfo</tt> object. |
62 * Constructs a {@code LockInfo} object. |
63 * |
63 * |
64 * @param className the fully qualified name of the class of the lock object. |
64 * @param className the fully qualified name of the class of the lock object. |
65 * @param identityHashCode the {@link System#identityHashCode |
65 * @param identityHashCode the {@link System#identityHashCode |
66 * identity hash code} of the lock object. |
66 * identity hash code} of the lock object. |
67 */ |
67 */ |
110 * <th align=left>Attribute Name</th> |
110 * <th align=left>Attribute Name</th> |
111 * <th align=left>Type</th> |
111 * <th align=left>Type</th> |
112 * </tr> |
112 * </tr> |
113 * <tr> |
113 * <tr> |
114 * <td>className</td> |
114 * <td>className</td> |
115 * <td><tt>java.lang.String</tt></td> |
115 * <td>{@code java.lang.String}</td> |
116 * </tr> |
116 * </tr> |
117 * <tr> |
117 * <tr> |
118 * <td>identityHashCode</td> |
118 * <td>identityHashCode</td> |
119 * <td><tt>java.lang.Integer</tt></td> |
119 * <td>{@code java.lang.Integer}</td> |
120 * </tr> |
120 * </tr> |
121 * </table> |
121 * </table> |
122 * </blockquote> |
122 * </blockquote> |
123 * |
123 * |
124 * @param cd {@code CompositeData} representing a {@code LockInfo} |
124 * @param cd {@code CompositeData} representing a {@code LockInfo} |
152 * of the object. This method returns a string equals to the value of: |
152 * of the object. This method returns a string equals to the value of: |
153 * <blockquote> |
153 * <blockquote> |
154 * <pre> |
154 * <pre> |
155 * lock.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(lock)) |
155 * lock.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(lock)) |
156 * </pre></blockquote> |
156 * </pre></blockquote> |
157 * where <tt>lock</tt> is the lock object. |
157 * where {@code lock} is the lock object. |
158 * |
158 * |
159 * @return the string representation of a lock. |
159 * @return the string representation of a lock. |
160 */ |
160 */ |
161 public String toString() { |
161 public String toString() { |
162 return className + '@' + Integer.toHexString(identityHashCode); |
162 return className + '@' + Integer.toHexString(identityHashCode); |