Java Doc for ThreadInfo.java in  » Apache-Harmony-Java-SE » java-package » java » lang » management » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.lang.management 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.management.ThreadInfo

ThreadInfo
public class ThreadInfo (Code)

Thread information.


since:
   1.5




Method Summary
public static  ThreadInfofrom(CompositeData cd)
     Receives a CompositeData representing a ThreadInfo object and attempts to return the root ThreadInfo instance.
Parameters:
  cd - a CompositeDate that represents aThreadInfo.
public  longgetBlockedCount()
     Returns the number of times that the thread represented by this ThreadInfo has been blocked on any monitor objects.
public  longgetBlockedTime()
     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.
public  StringgetLockName()
     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:

  • monitor class name
  • @
  • Integer.toHexString(System.identityHashCode(monitor))

if blocked or waiting on a monitor, a string representation ofthe monitor object.
public  longgetLockOwnerId()
     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. the thread identifier of the other thread which holds the monitorthat the thread associated with this ThreadInfo isblocked or waiting on.
public  StringgetLockOwnerName()
     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. the name of the other thread which holds the monitor that thethread associated with this ThreadInfo is blockedor waiting on.
public  StackTraceElement[]getStackTrace()
     If available, returns the stack trace for the thread represented by this ThreadInfo instance.
public  longgetThreadId()
     Returns the thread identifier of the thread represented by this ThreadInfo.
public  StringgetThreadName()
     Returns the name of the thread represented by this ThreadInfo.
public  Thread.StategetThreadState()
     Returns the thread state value of the thread represented by this ThreadInfo.
public  longgetWaitedCount()
     The number of times that the thread represented by this ThreadInfo has gone to the "wait" or "timed wait" state.
public  longgetWaitedTime()
     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.
public  booleanisInNative()
     Returns a boolean indication of whether or not the thread represented by this ThreadInfo is currently in a native method.
public  booleanisSuspended()
     Returns a boolean indication of whether or not the thread represented by this ThreadInfo is currently suspended.
public  StringtoString()
    



Method Detail
from
public static ThreadInfo from(CompositeData cd)(Code)
Receives a CompositeData representing a ThreadInfo object and attempts to return the root ThreadInfo instance.
Parameters:
  cd - a CompositeDate that represents aThreadInfo. if cd is non- null, returns a newinstance of ThreadInfo. If cd isnull, returns null.
throws:
  IllegalArgumentException - if argument cd does not correspond to aThreadInfo with the following attributes:
  • threadId(java.lang.Long)
  • threadName(java.lang.String)
  • threadState(java.lang.String)
  • suspended(java.lang.Boolean)
  • inNative(java.lang.Boolean)
  • blockedCount(java.lang.Long)
  • blockedTime(java.lang.Long)
  • waitedCount(java.lang.Long)
  • waitedTime (java.lang.Long)
  • lockName (java.lang.String)
  • lockOwnerId (java.lang.Long)
  • lockOwnerName (java.lang.String)
  • stackTrace (javax.management.openmbean.CompositeData[])
Each element of the stackTrace array must correspond to a java.lang.StackTraceElementand have the following attributes :
  • className (java.lang.String)
  • methodName (java.lang.String)
  • fileName (java.lang.String)
  • lineNumber (java.lang.Integer)
  • nativeMethod (java.lang.Boolean)



getBlockedCount
public long getBlockedCount()(Code)
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. the number of times the corresponding thread has been blocked ona monitor.



getBlockedTime
public long getBlockedTime()(Code)
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. if thread contention monitoring is currently enabled, the numberof milliseconds that the thread associated with thisThreadInfo has spent blocked on any monitors. Ifthread contention monitoring is supported but currently disabled,-1.
throws:
  UnsupportedOperationException - if the virtual machine does not support thread contentionmonitoring.
See Also:   ThreadMXBean.isThreadContentionMonitoringSupported
See Also:   ThreadMXBean.isThreadContentionMonitoringEnabled



getLockName
public String getLockName()(Code)
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:

  • monitor class name
  • @
  • Integer.toHexString(System.identityHashCode(monitor))

if blocked or waiting on a monitor, a string representation ofthe monitor object. Otherwise, null.
See Also:   Integer.toHexString(int)
See Also:   System.identityHashCode(java.lang.Object)



getLockOwnerId
public long getLockOwnerId()(Code)
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. the thread identifier of the other thread which holds the monitorthat the thread associated with this ThreadInfo isblocked or waiting on. If this ThreadInfo'sassociated thread is currently not blocked or waiting, or thereis no other thread holding the monitor, returns a -1.



getLockOwnerName
public String getLockOwnerName()(Code)
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. the name of the other thread which holds the monitor that thethread associated with this ThreadInfo is blockedor waiting on. If this ThreadInfo's associatedthread is currently not blocked or waiting, or there is no otherthread holding the monitor, returns a nullreference.



getStackTrace
public StackTraceElement[] getStackTrace()(Code)
If available, returns the stack trace for the thread represented by this ThreadInfo instance. The stack trace is returned in an array of 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 ThreadMXBean.getThreadInfo(long) ) then the returned array will have a length of zero.

the stack trace for the thread represented by thisThreadInfo.



getThreadId
public long getThreadId()(Code)
Returns the thread identifier of the thread represented by this ThreadInfo. the identifer of the thread corresponding to thisThreadInfo.



getThreadName
public String getThreadName()(Code)
Returns the name of the thread represented by this ThreadInfo. the name of the thread corresponding to thisThreadInfo.



getThreadState
public Thread.State getThreadState()(Code)
Returns the thread state value of the thread represented by this ThreadInfo. the thread state of the thread corresponding to thisThreadInfo.
See Also:   Thread.getState



getWaitedCount
public long getWaitedCount()(Code)
The number of times that the thread represented by this ThreadInfo has gone to the "wait" or "timed wait" state. the numer of times the corresponding thread has been in the"wait" or "timed wait" state.



getWaitedTime
public long getWaitedTime()(Code)
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 measued in milliseconds and will be measured over the time period since thread contention was most recently enabled. if thread contention monitoring is currently enabled, the numberof milliseconds that the thread associated with thisThreadInfo has spent waiting notifications. Ifthread contention monitoring is supported but currently disabled,-1.
throws:
  UnsupportedOperationException - if the virtual machine does not support thread contentionmonitoring.
See Also:   ThreadMXBean.isThreadContentionMonitoringSupported
See Also:   ThreadMXBean.isThreadContentionMonitoringEnabled



isInNative
public boolean isInNative()(Code)
Returns a boolean indication of whether or not the thread represented by this ThreadInfo is currently in a native method. if the corresponding thread is executing a native methodthen true, otherwise false.



isSuspended
public boolean isSuspended()(Code)
Returns a boolean indication of whether or not the thread represented by this ThreadInfo is currently suspended. if the corresponding thread is suspened thentrue, otherwise false.



toString
public String toString()(Code)



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.