| java.lang.Object | |
| ↳ | com.pnfsoftware.jeb.util.ThreadUtil |
Collection of thread utility static methods.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ThreadUtil() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static Thread |
create(Runnable r)
Create a daemon thread.
| ||||||||||
| static boolean |
monitor(Thread t, IMonitorInfoProvider provider)
Monitor a running thread, and attempt to terminate it after a dynamic timeout has elapsed.
| ||||||||||
| static Thread |
start(Runnable r)
Create and start a new daemon thread.
| ||||||||||
| static boolean |
stop(Thread t)
Gracefully stop a running thread.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Create a daemon thread. The thread is not started.
| r | the runnable |
|---|
Monitor a running thread, and attempt to terminate it after a dynamic timeout has elapsed. This method is blocking.
| t | the running thread |
|---|---|
| provider | information for the monitor (timeout, probingPeriod, etc.) |
Create and start a new daemon thread.
| r | the runnable |
|---|
Gracefully stop a running thread. This method is blocking.
| t | the running thread |
|---|