java.lang.Object | |
↳ | com.pnfsoftware.jeb.util.concurrent.AbstractThreadManager |
Known Direct Subclasses |
A non-static, customizable version of ThreadUtil
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractThreadManager() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract Thread |
create(Runnable r)
Create a thread.
| ||||||||||
boolean |
monitor(Thread t, IMonitorInfoProvider provider)
Monitor a running thread, and attempt to terminate it after a dynamic timeout has elapsed.
| ||||||||||
Thread |
start(Runnable r)
Create and start a new daemon thread.
| ||||||||||
Thread |
start(String name, Runnable r)
Create and start a new daemon thread.
| ||||||||||
boolean |
stop(Thread t)
Gracefully stop a running thread.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a thread.
r | the runnable |
---|
Monitor a running thread, and attempt to terminate it after a dynamic timeout has elapsed.
This method is blocking. In order for this method to work properly and responsively,
the monitored thread should check for interruptions
regularly,
and should not disregard InterruptedExceptions.
t | the running thread |
---|---|
provider | information for the monitor (timeout, probingPeriod, etc.); if the probing period is invalid, it will be set to a default 100ms. |
Create and start a new daemon thread.
r | the runnable |
---|
Create and start a new daemon thread.
name | thread name |
---|---|
r | the runnable |
Gracefully stop a running thread. This method is blocking.
t | the running thread |
---|