|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.starhope.appius.services.Charon
public class Charon
Charon is the reaper for zombie threads. It just removes threads from the server to clear out the memory and process space and such — threadwise garbage collection.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
private Set<WeakReference<Thread>> |
restlessDead
The set of threads who might be zombies |
private static Charon |
theCharon
the singleton instance |
private long |
threadJoinTimeout
How long to wait for a zombie to join us before passing it over for this reaper pass |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
Charon()
|
|
| Method Summary | |
|---|---|
void |
addZombie(Thread t)
Add a thread to the pool to be checked to reaping periodically |
void |
blog(String victim,
String note)
Write a log entry about someone |
private void |
blogThreadState(Thread t,
String name)
“blog” about the thread state |
private void |
excise()
WRITEME: Document this method brpocock@star-hope.org |
static Charon |
instance()
|
void |
run()
This is an overriding method. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final Set<WeakReference<Thread>> restlessDead
private final long threadJoinTimeout
private static Charon theCharon
| Constructor Detail |
|---|
public Charon()
| Method Detail |
|---|
public static Charon instance()
public void addZombie(Thread t)
t - The zombie thread to be checked for reaping
public void blog(String victim,
String note)
victim - the thread's namenote - what we want to talk about
private void blogThreadState(Thread t,
String name)
t - the thread whose state is to be examinedname - the name to use for blogging about it.private void excise()
public void run()
run in interface Runnablerun in class ThreadThread.run()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||