|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 열거형 정수 | 필드 | 메소드 | 상세 : 열거형 정수 | 필드 | 메소드 |
java.lang.Objectjava.lang.Enum <Thread.State >
java.lang.Thread.State
public static enum Thread.State
thread 상태입니다. thread 상태는, 다음의 어떤 것인가입니다.
NEW
RUNNABLE
BLOCKED
WAITING
TIMED_WAITING
TERMINATED
thread는 특정의 시점에서 1 개 상태 밖에 잡히지 않습니다. 이러한 상태는, operating system의 thread 상태에 영향을 미치지 않는 가상 머신 상태입니다.
Thread.getState()
열거형 정수의 개요 | |
---|---|
BLOCKED
블록 되어 모니터 락을 대기하고 있는 thread의 thread 상태입니다. |
|
NEW
아직 기동되어 있지 않은 thread의 thread 상태입니다. |
|
RUNNABLE
실행 가능한 thread의 thread 상태입니다. |
|
TERMINATED
종료한 thread의 thread 상태입니다. |
|
TIMED_WAITING
지정된 대기 시간, 대기중의 thread의 thread 상태. |
|
WAITING
대기중의 thread의 thread 상태. |
메소드의 개요 | |
---|---|
static Thread.State |
valueOf (String name)
지정한 이름을 가지는 이 형태의 열거형 정수를 돌려줍니다. |
static Thread.State [] |
values ()
이 열거형의 정수를 포함한 배열이 선언되고 있는 순서로 돌려줍니다. |
클래스 java.lang. Enum 로부터 상속된 메소드 |
---|
clone , compareTo , equals , finalize , getDeclaringClass , hashCode , name , ordinal , toString , valueOf |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
getClass , notify , notifyAll , wait , wait , wait |
열거형 정수의 상세 |
---|
public static final Thread.State NEW
public static final Thread.State RUNNABLE
public static final Thread.State BLOCKED
Object.wait
를 호출한 뒤에 동기화한 블록 또는 메소드에 재차 들어가는 것을 대기하고 있습니다.
public static final Thread.State WAITING
Object.wait
(타임 아웃 없음)Thread.join
(타임 아웃 없음)LockSupport.park
대기 상태의 thread는, 다른 thread가 특정의 액션을 실행하는 것을 대기하고 있습니다. 예를 들어, 객체로 Object.wait() 를 호출한 thread는, 다른 thread가 그 객체로 Object.notify() 또는 Object.notifyAll() 를 호출하는 것을 대기합니다. Thread.join() 를 호출한 thread는, 지정된 thread가 종료하는 것을 대기합니다.
public static final Thread.State TIMED_WAITING
Thread.sleep
Object.wait
(타임 아웃 있어)Thread.join
(타임 아웃 없음)LockSupport.parkNanos
LockSupport.parkUntil
public static final Thread.State TERMINATED
메소드의 상세 |
---|
public static Thread.State [] values()
for (Thread.State c : Thread.State.values()) System.out.println(c);
public static Thread.State valueOf(String name)
name
- 반환되는 열거형 정수의 이름
IllegalArgumentException
- 지정된 이름을 가지는 정수를
이 열거형이 가지고 있지 않은 경우
NullPointerException
- 인수가 null 의 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 열거형 정수 | 필드 | 메소드 | 상세 : 열거형 정수 | 필드 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.