public final class ThreadPoolAsynchronousRunner extends java.lang.Object implements AsynchronousRunner
Constructor and Description |
---|
ThreadPoolAsynchronousRunner(int num_threads,
boolean daemon) |
ThreadPoolAsynchronousRunner(int num_threads,
boolean daemon,
int max_individual_task_time,
int deadlock_detector_interval,
int interrupt_delay_after_apparent_deadlock) |
ThreadPoolAsynchronousRunner(int num_threads,
boolean daemon,
int max_individual_task_time,
int deadlock_detector_interval,
int interrupt_delay_after_apparent_deadlock,
java.lang.String threadLabel) |
ThreadPoolAsynchronousRunner(int num_threads,
boolean daemon,
int max_individual_task_time,
int deadlock_detector_interval,
int interrupt_delay_after_apparent_deadlock,
java.util.Timer myTimer) |
ThreadPoolAsynchronousRunner(int num_threads,
boolean daemon,
int max_individual_task_time,
int deadlock_detector_interval,
int interrupt_delay_after_apparent_deadlock,
java.util.Timer myTimer,
java.lang.String threadLabel) |
ThreadPoolAsynchronousRunner(int num_threads,
boolean daemon,
java.util.Timer sharedTimer) |
ThreadPoolAsynchronousRunner(int num_threads,
boolean daemon,
java.util.Timer sharedTimer,
java.lang.String threadLabel) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Clean-up resources held by this asynchronous runner
as soon as possible.
|
void |
close(boolean skip_remaining_tasks)
Finish with this AsynchronousRunner, and clean-up
any Threads or resources it may hold.
|
int |
getActiveCount() |
int |
getIdleCount() |
java.lang.String |
getMultiLineStatusString() |
int |
getPendingTaskCount() |
java.lang.String |
getStackTraces() |
java.lang.String |
getStatus() |
int |
getThreadCount() |
void |
postRunnable(java.lang.Runnable r) |
public ThreadPoolAsynchronousRunner(int num_threads, boolean daemon, int max_individual_task_time, int deadlock_detector_interval, int interrupt_delay_after_apparent_deadlock, java.util.Timer myTimer, java.lang.String threadLabel)
public ThreadPoolAsynchronousRunner(int num_threads, boolean daemon, int max_individual_task_time, int deadlock_detector_interval, int interrupt_delay_after_apparent_deadlock, java.util.Timer myTimer)
public ThreadPoolAsynchronousRunner(int num_threads, boolean daemon, int max_individual_task_time, int deadlock_detector_interval, int interrupt_delay_after_apparent_deadlock, java.lang.String threadLabel)
public ThreadPoolAsynchronousRunner(int num_threads, boolean daemon, int max_individual_task_time, int deadlock_detector_interval, int interrupt_delay_after_apparent_deadlock)
public ThreadPoolAsynchronousRunner(int num_threads, boolean daemon, java.util.Timer sharedTimer, java.lang.String threadLabel)
public ThreadPoolAsynchronousRunner(int num_threads, boolean daemon, java.util.Timer sharedTimer)
public ThreadPoolAsynchronousRunner(int num_threads, boolean daemon)
public void postRunnable(java.lang.Runnable r)
postRunnable
in interface AsynchronousRunner
public int getThreadCount()
public void close(boolean skip_remaining_tasks)
AsynchronousRunner
close
in interface AsynchronousRunner
skip_remaining_tasks
- Should be regarded as
a hint, not a guarantee. If true, pending,
not-yet-performed tasks will be skipped,
if possible.
Currently executing tasks may or
may not be interrupted. If false, all
previously scheduled tasks will be
completed prior to clean-up. The method
returns immediately regardless.public void close()
AsynchronousRunner
close
in interface ClosableResource
close
in interface AsynchronousRunner
public int getActiveCount()
public int getIdleCount()
public int getPendingTaskCount()
public java.lang.String getStatus()
public java.lang.String getStackTraces()
public java.lang.String getMultiLineStatusString()