Command Interrupter
public class CommandInterrupter
extends Object
java.lang.Object | |
↳ | com.android.tradefed.command.Command Interrupter |
שירות המאפשר להפריע לפקודות 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 () |
שדות
בנאים ציבוריים
Command Interrupter
public CommandInterrupter ()
שיטות ציבוריות
לאפשר הפרעה
public void allowInterrupt ()
אפשר להפסיק את השרשור הנוכחי.
allowInterruptAsync
publicallowInterruptAsync (Thread thread, long delay, TimeUnit unit)
אפשר להפסיק שרשור שצוין לאחר עיכוב.
פרמטרים | |
---|---|
thread | Thread : חוט לסימון כניתן להפסקה |
delay | long : זמן מעכשיו עד לעיכוב הביצוע |
unit | TimeUnit : יחידת הזמן של פרמטר ההשהיה |
החזרות | |
---|---|
blockInterrupt
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 | נכון אם השרשור הנוכחי ניתן להפסקה |