public static final class ThreadService.CallerRunsRejectionPolicy extends Object implements ThreadPoolRejectionHandler
ThreadPoolRejectionHandler
which attempts to run the task in
the current thread.Constructor and Description |
---|
ThreadService.CallerRunsRejectionPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
rejectedExecution(RunnableTask runnable,
ThreadPool threadPool)
Called when a task can not be executed by a
ThreadPool . |
public ThreadService.CallerRunsRejectionPolicy()
public void rejectedExecution(RunnableTask runnable, ThreadPool threadPool) throws APIException
ThreadPoolRejectionHandler
ThreadPool
.rejectedExecution
in interface ThreadPoolRejectionHandler
runnable
- the task.threadPool
- the thread pool.APIException
- if unable to handle the execution. This would be
regarded as a serious error.ThreadPoolRejectionHandler.rejectedExecution(RunnableTask,ThreadPool)
Copyright © 2016 Push Technology Ltd. All Rights Reserved.