CommandInterrupter
public
class
CommandInterrupter
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.command.CommandInterrupter |
Service permettant d'interrompre ou de marquer comme non interruptibles les commandes TradeFederation.
Résumé
Champs | |
|---|---|
public
static
final
CommandInterrupter |
INSTANCE
Singleton. |
Constructeurs publics | |
|---|---|
CommandInterrupter()
|
|
Méthodes publiques | |
|---|---|
void
|
allowInterrupt()
Autorise l'interruption du thread actuel. |
Future<?>
|
allowInterruptAsync(Thread thread, long delay, TimeUnit unit)
Autorise l'interruption d'un thread spécifié après un délai. |
void
|
blockInterrupt()
Empêche l'interruption du thread actuel. |
void
|
checkInterrupted()
Interrompt le thread actuel s'il doit l'être. |
void
|
interrupt(Thread thread, String message, ErrorIdentifier errorId)
Signaler un thread, en l'interrompant si et quand il devient interruptible. |
boolean
|
isInterruptible(Thread thread)
|
boolean
|
isInterruptible()
|
Champs
Constructeurs publics
CommandInterrupter
public CommandInterrupter ()
Méthodes publiques
allowInterrupt
public void allowInterrupt ()
Autorise l'interruption du thread actuel.
allowInterruptAsync
public Future<?> allowInterruptAsync (Thread thread,
long delay,
TimeUnit unit)Autorise l'interruption d'un thread spécifié après un délai.
| Paramètres | |
|---|---|
thread |
Thread : thread à marquer comme interruptible |
delay |
long : délai avant l'exécution |
unit |
TimeUnit : unité de temps du paramètre de délai |
| Renvoie | |
|---|---|
Future<?> |
|
blockInterrupt
public void blockInterrupt ()
Empêche l'interruption du thread actuel.
checkInterrupted
public void checkInterrupted ()
Interrompt le thread actuel s'il doit l'être. Les threads sont encouragés à appeler cette méthode de manière périodique afin de générer le RunInterruptedException approprié.
| Génère | |
|---|---|
RunInterruptedException |
|
interrompre
public void interrupt (Thread thread,
String message,
ErrorIdentifier errorId)Signaler un thread, en l'interrompant si et quand il devient interruptible.
| Paramètres | |
|---|---|
thread |
Thread : thread à marquer pour l'interruption |
message |
String : message d'interruption |
errorId |
ErrorIdentifier |
isInterruptible
public boolean isInterruptible (Thread thread)
| Paramètres | |
|---|---|
thread |
Thread |
| Renvoie | |
|---|---|
boolean |
"true" si le thread spécifié est interruptible |
isInterruptible
public boolean isInterruptible ()
| Renvoie | |
|---|---|
boolean |
"true" si le thread actuel est interruptible |