public static final class ThreadService.AbortRejectionPolicy extends Object implements ThreadPoolRejectionHandler
ThreadPoolRejectionHandler
that simply throws an Exception.Constructor and Description |
---|
AbortRejectionPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
rejectedExecution(RunnableTask runnable,
ThreadPool threadPool)
Called when a task can not be executed by a
ThreadPool . |
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 © 2020 Push Technology Ltd. All Rights Reserved.