public class

ThreadRegistry

extends Object
java.lang.Object
   ↳ com.microstrategy.web.platform.ThreadRegistry

Class Overview

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.

Summary

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
From class java.lang.Object

Public Constructors

public ThreadRegistry ()

Public Methods

public static ThreadRegistry getInstance ()

public boolean isTerminating ()

Returns whether application is terminating. Will only return true if terminate() was invoked.

public void register (Thread thread)

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.

public void register (Timer timer)

public void terminate ()

Interrupts all registered threads, and cancels timers. This is normally triggered from an application controller when its shutdown.