Thread.State


Thread.State java.lang

Java 5.0 serializable comparable enum

This enumerated type defines the possible states of a thread. Call the getState( ) method of a Thread object to obtain one of the enumerated constants defined here. A NEW thread has not been started yet, and a TERMINATED tHRead has exited. A BLOCKED thread is waiting to enter a synchronized method or block. A WAITING thread is waiting in Object.wait( ) , Thread.join( ) , or a similar method. A TIMED_WAITING thread is waiting but is subject to a timeout, such as in THRead.sleep( ) or the timed versions of Object.wait( ) and Thread.join( ) . Finally, a thread that has been started and has not yet exited and is not blocked or waiting is RUNNABLE . This does not mean that the operating system is currently running it or that it is even making any forward progress, but that it is at least available to run when the operating system gives it the CPU.

 public enum  Thread.State  {  // Enumerated Constants   NEW  ,  RUNNABLE  ,  BLOCKED  ,  WAITING  ,  TIMED_WAITING  ,  TERMINATED  ;  // Public Class Methods  public static Thread.State  valueOf  (String  name  );        public static final Thread.State[ ]  values  ( );   } 

Returned By

Thread.getState( ) , java.lang.management.ThreadInfo.getThreadState( )



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