명령인터럽터
public class CommandInterrupter
extends Object
java.lang.Object | |
↳ | com.android.tradefed.command.CommandInterrupter |
TradeFederation 명령을 중단하거나 중단 불가능으로 표시할 수 있는 서비스입니다.
요약
필드 | |
---|---|
public static final CommandInterrupter | INSTANCE 하나씩 일어나는 것. |
공개 생성자 | |
---|---|
CommandInterrupter () |
공개 메소드 | |
---|---|
void | allowInterrupt () 현재 스레드가 중단되도록 허용합니다. |
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 () |
필드
공개 생성자
명령인터럽터
public CommandInterrupter ()
공개 메소드
인터럽트 허용
public void allowInterrupt ()
현재 스레드가 중단되도록 허용합니다.
AllowInterruptAsync
publicallowInterruptAsync (Thread thread, long delay, TimeUnit unit)
지정된 스레드가 지연 후 중단되도록 허용합니다.
매개변수 | |
---|---|
thread | Thread : 인터럽트 가능으로 표시할 스레드 |
delay | long : 지금부터 실행을 지연할 시간 |
unit | TimeUnit : 지연 매개변수의 시간 단위 |
보고 | |
---|---|
블록인터럽트
public void blockInterrupt ()
현재 스레드가 중단되는 것을 방지합니다.
점검이 중단되었습니다.
public void checkInterrupted ()
중단되어야 하는 경우 현재 스레드를 중단합니다. 올바른 RunInterruptedException
발생시키기 위해 스레드는 이 메서드를 주기적으로 호출하는 것이 좋습니다.
던지기 | |
---|---|
RunInterruptedException |
방해하다
public void interrupt (Thread thread, String message, ErrorIdentifier errorId)
스레드에 플래그를 지정하여 인터럽트가 가능해지면 스레드를 중단합니다.
매개변수 | |
---|---|
thread | Thread : 중단을 표시하는 스레드 |
message | String : 중단 메시지 |
errorId | ErrorIdentifier |
중단 가능
public boolean isInterruptible (Thread thread)
매개변수 | |
---|---|
thread | Thread |
보고 | |
---|---|
boolean | 지정된 스레드가 인터럽트 가능하면 참 |
중단 가능
public boolean isInterruptible ()
보고 | |
---|---|
boolean | 현재 스레드가 인터럽트 가능하면 true |