|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.util.SimpleThreadManager
public class SimpleThreadManager
The thread manager keeps track of active threads. It can be used to ensure that all threads are complete before a job terminates.
Constructor Summary | |
---|---|
SimpleThreadManager()
Default Constructor. |
|
SimpleThreadManager(ExecutorService executors)
Constructor uses provided ExecutorService. |
Method Summary | |
---|---|
String[] |
activeDescriptions()
Return a array of the descriptions of all active threads. |
void |
close()
Close the ThreadManager and free resource. |
void |
run(Runnable runnable,
String description)
Run a job. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleThreadManager()
public SimpleThreadManager(ExecutorService executors)
executors
- Method Detail |
---|
public void run(Runnable runnable, String description)
run
in interface ThreadManager
runnable
- The job.description
- The description of the job.public String[] activeDescriptions()
activeDescriptions
in interface ThreadManager
public String toString()
toString
in class Object
public void close()
ThreadManager
close
in interface ThreadManager
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |