declare namespace java { namespace lang { namespace management { /** * Information about a snapshot of the state of a thread. * @since 1.5 */ // @ts-ignore class ThreadInfo extends java.lang.Object { /** * Returns the number of times that the thread represented by this * ThreadInfo has been blocked on any monitor objects. The * count is from the start of the thread's life. * @return the number of times the corresponding thread has been blocked on * a monitor. */ // @ts-ignore public getBlockedCount(): number /*long*/ /** * If thread contention monitoring is supported and enabled, returns the * total amount of time that the thread represented by this * ThreadInfo has spent blocked on any monitor objects. The * time is measued in milliseconds and will be measured over the time period * since thread contention was most recently enabled. * @return if thread contention monitoring is currently enabled, the number * of milliseconds that the thread associated with this * ThreadInfo has spent blocked on any monitors. If * thread contention monitoring is supported but currently disabled, * -1. * @throws UnsupportedOperationException * if the virtual machine does not support thread contention * monitoring. * @see ThreadMXBean#isThreadContentionMonitoringSupported() * @see ThreadMXBean#isThreadContentionMonitoringEnabled() */ // @ts-ignore public getBlockedTime(): number /*long*/ /** * If the thread represented by this ThreadInfo is currently * blocked on or waiting on a monitor object, returns a string * representation of that monitor object. *

* The monitor's string representation is comprised of the following * component parts: *

* @return if blocked or waiting on a monitor, a string representation of * the monitor object. Otherwise, null. * @see Integer#toHexString(int) * @see System#identityHashCode(java.lang.Object) */ // @ts-ignore public getLockName(): string /** * If the thread represented by this ThreadInfo is currently * blocked on or waiting on a monitor object, returns the thread identifier * of the thread which owns the monitor. * @return the thread identifier of the other thread which holds the monitor * that the thread associated with this ThreadInfo is * blocked or waiting on. If this ThreadInfo's * associated thread is currently not blocked or waiting, or there * is no other thread holding the monitor, returns a -1. */ // @ts-ignore public getLockOwnerId(): number /*long*/ /** * If the thread represented by this ThreadInfo is currently * blocked on or waiting on a monitor object, returns the name of the thread * which owns the monitor. * @return the name of the other thread which holds the monitor that the * thread associated with this ThreadInfo is blocked * or waiting on. If this ThreadInfo's associated * thread is currently not blocked or waiting, or there is no other * thread holding the monitor, returns a null * reference. */ // @ts-ignore public getLockOwnerName(): string /** * If the thread corresponding to this ThreadInfo is blocked * then this method returns a {@link LockInfo} object that contains details * of the associated lock object. * @return a LockInfo object if this ThreadInfo's * thread is currently blocked, else null. */ // @ts-ignore public getLockInfo(): java.lang.management.LockInfo /** * If available, returns the stack trace for the thread represented by this * ThreadInfo instance. The stack trace is returned in an * array of {@link StackTraceElement} objects with the "top" of the * stack encapsulated in the first array element and the "bottom" * of the stack in the last array element. *

* If this ThreadInfo was created without any stack trace * information (e.g. by a call to {@link ThreadMXBean#getThreadInfo(long)}) * then the returned array will have a length of zero. *

* @return the stack trace for the thread represented by this * ThreadInfo. */ // @ts-ignore public getStackTrace(): java.lang.StackTraceElement[] /** * Returns the thread identifier of the thread represented by this * ThreadInfo. * @return the identifier of the thread corresponding to this * ThreadInfo. */ // @ts-ignore public getThreadId(): number /*long*/ /** * Returns the name of the thread represented by this * ThreadInfo. * @return the name of the thread corresponding to this * ThreadInfo. */ // @ts-ignore public getThreadName(): string /** * Returns the thread state value of the thread represented by this * ThreadInfo. * @return the thread state of the thread corresponding to this * ThreadInfo. * @see Thread#getState() */ // @ts-ignore public getThreadState(): java.lang.Thread.State /** * The number of times that the thread represented by this * ThreadInfo has gone to the "wait" or "timed * wait" state. * @return the number of times the corresponding thread has been in the * "wait" or "timed wait" state. */ // @ts-ignore public getWaitedCount(): number /*long*/ /** * If thread contention monitoring is supported and enabled, returns the * total amount of time that the thread represented by this * ThreadInfo has spent waiting for notifications. The time * is measured in milliseconds and will be measured over the time period * since thread contention was most recently enabled. * @return if thread contention monitoring is currently enabled, the number * of milliseconds that the thread associated with this * ThreadInfo has spent waiting notifications. If * thread contention monitoring is supported but currently disabled, * -1. * @throws UnsupportedOperationException * if the virtual machine does not support thread contention * monitoring. * @see ThreadMXBean#isThreadContentionMonitoringSupported() * @see ThreadMXBean#isThreadContentionMonitoringEnabled() */ // @ts-ignore public getWaitedTime(): number /*long*/ /** * Returns a boolean indication of whether or not the thread * represented by this ThreadInfo is currently in a native * method. * @return if the corresponding thread is executing a native method * then true, otherwise false. */ // @ts-ignore public isInNative(): boolean /** * Returns a boolean indication of whether or not the thread * represented by this ThreadInfo is currently suspended. * @return if the corresponding thread is suspended then * true, otherwise false. */ // @ts-ignore public isSuspended(): boolean /** * Returns an array of MonitorInfo objects, one for every * monitor object locked by the Thread corresponding to this * ThreadInfo when it was instantiated. * @return an array whose elements comprise of MonitorInfo * objects - one for each object monitor locked by this * ThreadInfo object's corresponding thread. If no * monitors are locked by the thread then the array will have a * length of zero. */ // @ts-ignore public getLockedMonitors(): java.lang.management.MonitorInfo[] /** * Returns an array of LockInfo objects, each one containing * information on an ownable synchronizer (a synchronizer that makes use of * the AbstractOwnableSynchronizer type and which is * completely owned by a single thread) locked by the Thread * corresponding to this ThreadInfo when it was instantiated. * @return an array whose elements comprise of LockInfo * objects - one for each ownable synchronizer locked by this * ThreadInfo object's corresponding thread. If no * ownable synchronizer are locked by the thread then the array will * have a length of zero. */ // @ts-ignore public getLockedSynchronizers(): java.lang.management.LockInfo[] /** * Receives a {@link CompositeData} representing a ThreadInfo * object and attempts to return the root ThreadInfo * instance. * @param cd * a CompositeData that represents a * ThreadInfo. * @return if cd is non- null, returns a new * instance of ThreadInfo. If cd is * null, returns null. * @throws IllegalArgumentException * if argument cd does not correspond to a * ThreadInfo with the following attributes: * * Each element of the stackTrace array must * correspond to a java.lang.StackTraceElement * and have the following attributes : * */ // @ts-ignore public static from(cd: javax.management.openmbean.CompositeData): java.lang.management.ThreadInfo /** * Returns a text description of this thread info. * @return a text description of this thread info. */ // @ts-ignore public toString(): string /** * {@inheritDoc} */ // @ts-ignore public equals(obj: java.lang.Object | any): boolean /** * {@inheritDoc} */ // @ts-ignore public hashCode(): number /*int*/ } } } }