java.lang.management

Class LockInfo

public class LockInfo extends Object

Provides information on a lock held by a thread. A lock can be either a built-in monitor, an ownable synchronizer (i.e. a subclass of {@link java.util.concurrent.locks.AbstractOwnableSynchronizer}), or a {@link java.util.concurrent.locks.Condition} object.

Since: 1.6

Method Summary
StringgetClassName()
Returns the class name of the lock object.
intgetIdentityHashCode()
Returns the identity hash code of the lock object.
StringtoString()
Returns a textual representation of the lock, constructed by concatenating the class name, '@' and the identity hash code in unsigned hexadecimal form.

Method Detail

getClassName

public String getClassName()
Returns the class name of the lock object.

Returns: the class name of the lock object.

getIdentityHashCode

public int getIdentityHashCode()
Returns the identity hash code of the lock object.

Returns: the identity hash code of the lock object.

toString

public String toString()
Returns a textual representation of the lock, constructed by concatenating the class name, '@' and the identity hash code in unsigned hexadecimal form.

Returns: a textual representation of the lock.