Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


ThreadMXBeanjava.lang.management

Java 5.0

This MXBean interface
allows monitoring of thread usage
in a Java VM. A number of methods, such as getThreadCount(
) and getPeakThreadCount( ), return
information about all running threads. Other methods return
information about individual threads. Threads are identified by their
thread id, which is a long integer.
getAllThreadIds(
) returns all ids as an array of
long. Complete information, including stack trace,
about a thread or set of threads can be obtained with the
getTHReadInfo( ) methods, which return
ThreadInfo objects.

If isThreadCpuTimeSupported(
) returns TRue, you can
enable thread timing with setThreadCpuTimeEnabled(
) and query the runtime of a specific thread
with getThreadCpuTime(
) and getThreadUserTime( ).
The values returned by these methods are measured in nanoseconds.

One of the potentially most useful methods of this interface is
findMonitorDeadlockedThreads(
) . It looks for cycles of
threads that are deadlocked waiting to lock objects whose locks are
held by other threads in the cycle.

public interface

ThreadMXBean {
// Public Instance Methods
long[ ]

findMonitorDeadlockedThreads ( );
long[ ]

getAllThreadIds ( );
long

getCurrentThreadCpuTime ( );
long

getCurrentThreadUserTime ( );
int

getDaemonThreadCount ( );
int

getPeakThreadCount ( );
int

getThreadCount ( );
long

getThreadCpuTime (long

id );
ThreadInfo

getThreadInfo (long

id );
ThreadInfo[ ]

getThreadInfo (long[ ]

ids );
ThreadInfo[ ]

getThreadInfo (long[ ]

ids , int

maxDepth );
ThreadInfo

getThreadInfo (long

id , int

maxDepth );
long

getThreadUserTime (long

id );
long

getTotalStartedThreadCount ( );
boolean

isCurrentThreadCpuTimeSupported ( );
boolean

isThreadContentionMonitoringEnabled ( );
boolean

isThreadContentionMonitoringSupported ( );
boolean

isThreadCpuTimeEnabled ( );
boolean

isThreadCpuTimeSupported ( );
void

resetPeakThreadCount ( );
void

setThreadContentionMonitoringEnabled (boolean

enable );
void

setThreadCpuTimeEnabled (boolean

enable );
}


Returned By


ManagementFactory.getThreadMXBean( )


    / 1191