Node Director
|
Implements timeout. More...
Public Member Functions | |
TimeoutThread () | |
TimeoutThread (long timeout) | |
Setup and start timeout thread with the given timeout for the current thread. | |
void | work () |
void | setParent (Thread master) |
Set parent thread. | |
void | setTimeout (long timeout) |
Set timeout in milliseconds. | |
Public Member Functions inherited from sfi.director.util.StoppableThread | |
synchronized void | stopGracefully () |
void | interrupt () |
void | clearInterrupt () |
Public Member Functions inherited from sfi.director.util.DirectorThread | |
DirectorThread () | |
final void | run () |
Additional Inherited Members | |
Public Attributes inherited from sfi.director.util.StoppableThread | |
boolean | keeprunning = true |
Exception | stack |
Protected Member Functions inherited from sfi.director.util.DirectorThread | |
void | finalize () throws Throwable |
Implements timeout.
Once started, the timeout thread waits the configured amount of time and then interrupts the parent thread. If the TimeoutThread is interrupted before the timeout is over the parent thread is not going to be interrupted.
sfi.director.util.TimeoutThread.TimeoutThread | ( | ) |
References sfi.director.util.TimeoutThread.setParent().
sfi.director.util.TimeoutThread.TimeoutThread | ( | long | timeout | ) |
Setup and start timeout thread with the given timeout for the current thread.
References sfi.director.util.TimeoutThread.setTimeout().
void sfi.director.util.TimeoutThread.setParent | ( | Thread | master | ) |
Set parent thread.
The object is created with the parent being the current thread. So, usually it is unnecessary to explicitly setParent().
Referenced by sfi.director.util.TimeoutThread.TimeoutThread().
void sfi.director.util.TimeoutThread.setTimeout | ( | long | timeout | ) |
Set timeout in milliseconds.
Referenced by sfi.director.util.TimeoutThread.TimeoutThread().
void sfi.director.util.TimeoutThread.work | ( | ) |
Reimplemented from sfi.director.util.DirectorThread.