CommandInterrupter
public
class
CommandInterrupter
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.command.CommandInterrupter |
TradeFederation 명령어를 중단하거나 중단할 수 없는 것으로 표시할 수 있는 서비스입니다.
요약
필드 | |
|---|---|
public
static
final
CommandInterrupter |
INSTANCE
싱글톤. |
공개 생성자 | |
|---|---|
CommandInterrupter()
|
|
공개 메서드 | |
|---|---|
void
|
allowInterrupt()
현재 스레드를 중단할 수 있도록 허용합니다. |
Future<?>
|
allowInterruptAsync(Thread thread, long delay, TimeUnit unit)
지연 후 지정된 스레드를 중단할 수 있도록 허용합니다. |
void
|
blockInterrupt()
현재 스레드가 중단되지 않도록 방지합니다. |
void
|
checkInterrupted()
중단해야 하는 경우 현재 스레드를 중단합니다. |
void
|
interrupt(Thread thread, String message, ErrorIdentifier errorId)
스레드를 플래그 지정하고 중단할 수 있게 되면 중단합니다. |
boolean
|
isInterruptible(Thread thread)
|
boolean
|
isInterruptible()
|
필드
공개 생성자
CommandInterrupter
public CommandInterrupter ()
공개 메서드
allowInterrupt
public void allowInterrupt ()
현재 스레드를 중단할 수 있도록 허용합니다.
allowInterruptAsync
public Future<?> allowInterruptAsync (Thread thread,
long delay,
TimeUnit unit)지연 후 지정된 스레드를 중단할 수 있도록 허용합니다.
| 매개변수 | |
|---|---|
thread |
Thread: 중단할 수 있는 것으로 표시할 스레드 |
delay |
long: 지금부터 실행을 지연할 시간 |
unit |
TimeUnit: 지연 매개변수의 시간 단위 |
| 반환 | |
|---|---|
Future<?> |
|
blockInterrupt
public void blockInterrupt ()
현재 스레드가 중단되지 않도록 방지합니다.
checkInterrupted
public void checkInterrupted ()
중단해야 하는 경우 현재 스레드를 중단합니다. 올바른 RunInterruptedException을 발생시키기 위해 스레드는 이 메서드를
주기적으로 호출하는 것이 좋습니다.
| 생성 값 | |
|---|---|
RunInterruptedException |
|
interrupt
public void interrupt (Thread thread,
String message,
ErrorIdentifier errorId)스레드를 플래그 지정하고 중단할 수 있게 되면 중단합니다.
| 매개변수 | |
|---|---|
thread |
Thread: 중단할 것으로 표시할 스레드 |
message |
String: 중단 메시지 |
errorId |
ErrorIdentifier |
isInterruptible
public boolean isInterruptible (Thread thread)
| 매개변수 | |
|---|---|
thread |
Thread |
| 반환 | |
|---|---|
boolean |
지정된 스레드를 중단할 수 있는 경우 true |
isInterruptible
public boolean isInterruptible ()
| 반환 | |
|---|---|
boolean |
현재 스레드를 중단할 수 있는 경우 true |