public class JdkRejectedExecutionHandler extends Object implements RejectedExecutionHandler
ThreadPoolExecutor.CallerRunsPolicy
Constructor and Description |
---|
JdkRejectedExecutionHandler(logger : LogService)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
rejectedExecution(task : Runnable,
executor : ThreadPoolExecutor) |
protected static boolean |
runRejectedTask(runnable : Runnable,
executor : ThreadPoolExecutor)
Run the given task within the current thread if the executor is not shut down.
|
@Inject
public new
(logger : LogService)
logger
- the logging service that must be used for output the errors.public def
rejectedExecution(task : Runnable,
executor : ThreadPoolExecutor) : void
rejectedExecution
in interface RejectedExecutionHandler
protected static def
runRejectedTask(runnable : Runnable,
executor : ThreadPoolExecutor) : boolean
JdkRejectedExecutionHandler
runnable
- the runnable task to be executedexecutor
- the executor attempting to give the shut down statustrue
if the task is run. false
if the task was not run.ThreadPoolExecutor.CallerRunsPolicy
Copyright © 2018 the original authors or authors.