ThreadInfo


ThreadInfo java.lang.management

Java 5.0

This class represents information about a thread from a ThreadMXBean . Some information, such as thread name , id, state, and stack trace are also available through the java.lang.Thread object. Other more useful information includes the object upon which a thread is waiting and the owner of the lock that the thread is trying to acquire. If THReadMXBean indicates that thread contention monitoring is supported and enabled, the ThreadInfo methods getBlockedCount( ) and getBlockedTime( ) return the number of times the thread has blocked or waited and the amount of time it has spent in the blocked and waiting states.

 public class  ThreadInfo  {  // No Constructor   // Public Class Methods  public static ThreadInfo  from  (javax.management.openmbean.CompositeData  cd  );  // Public Instance Methods  public long  getBlockedCount  ( );        public long  getBlockedTime  ( );        public String  getLockName  ( );        public long  getLockOwnerId  ( );        public String  getLockOwnerName  ( );        public StackTraceElement[ ]  getStackTrace  ( );        public long  getThreadId  ( );        public String  getThreadName  ( );        public Thread.State  getThreadState  ( );        public long  getWaitedCount  ( );        public long  getWaitedTime  ( );        public boolean  isInNative  ( );        public boolean  isSuspended  ( );  // Public Methods Overriding Object  public String  toString  ( );   } 

Returned By

ThreadMXBean.getThreadInfo( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net