java.lang.Object | |
↳ | com.microstrategy.web.platform.ThreadRegistry |
This class maintains a simple running/terminating status, tracks threads and timers created by the application, and ensures they are properly cleaned up when we terminate.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ThreadRegistry() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static ThreadRegistry | getInstance() | ||||||||||
boolean |
isTerminating()
Returns whether application is terminating.
| ||||||||||
void |
register(Thread thread)
Registers thread.
| ||||||||||
void | register(Timer timer) | ||||||||||
void |
terminate()
Interrupts all registered threads, and cancels timers.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns whether application is terminating. Will
only return true if terminate()
was invoked.
Registers thread. Please ensure thread can be terminated with an interrupt, i.e. interrupts should not be caught and ignored. When interrupted, the thread should proceed to clean itself up and terminate.
Interrupts all registered threads, and cancels timers. This is normally triggered from an application controller when its shutdown.