|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.semanticweb.elk.util.concurrent.computation.SimpleInterrupter
public class SimpleInterrupter
A simple interrupter, which just stores the flag about the interrupt status and interrupts the thread that is assigned to this interrupter
| Constructor Summary | |
|---|---|
SimpleInterrupter()
|
|
| Method Summary | |
|---|---|
void |
clearInterrupt()
Clears the interrupt status: computation is no longer interrupted |
void |
clearThreadToInterrupt()
De-registers a thread to be interrupted (so that no thread is interrupted accidently) |
void |
interrupt()
Requests the computation to be interrupted |
boolean |
isInterrupted()
Checks if the computation was requested to be interrupted |
void |
registerCurrentThreadToInterrupt()
Assign the current thread is interrupted when interrupt() is
called |
void |
registerThreadToInterrupt(Thread toInterrupt)
Make sure the given thread is interrupted when interrupt() is
called |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleInterrupter()
| Method Detail |
|---|
public void registerThreadToInterrupt(Thread toInterrupt)
interrupt() is
called
toInterrupt - the thread which will be interruptedpublic void registerCurrentThreadToInterrupt()
interrupt() is
called
public void clearThreadToInterrupt()
public void interrupt()
Interrupter
interrupt in interface Interrupterpublic boolean isInterrupted()
Interrupter
isInterrupted in interface Interruptertrue if the computation was requested to be interruptedpublic void clearInterrupt()
Interrupter
clearInterrupt in interface Interrupter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||