Class NoRejectedExecutionHandler
- java.lang.Object
-
- com.github.javinator9889.threading.pools.rejectedhandlers.NoRejectedExecutionHandler
-
- All Implemented Interfaces:
java.util.concurrent.RejectedExecutionHandler
public class NoRejectedExecutionHandler extends java.lang.Object implements java.util.concurrent.RejectedExecutionHandlerHandler that does nothing when a thread is rejected - this handler is not recommended to be used as you will lose information (threads that are not execute will disappear).Defined at
ThreadsPooling.NO_ACTION_ON_REJECTED_HANDLER.
-
-
Constructor Summary
Constructors Constructor Description NoRejectedExecutionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrejectedExecution(java.lang.Runnable r, java.util.concurrent.ThreadPoolExecutor executor)Method that may be invoked by aThreadPoolExecutorwhenexecutecannot accept a task.
-
-
-
Method Detail
-
rejectedExecution
public void rejectedExecution(java.lang.Runnable r, java.util.concurrent.ThreadPoolExecutor executor)Method that may be invoked by aThreadPoolExecutorwhenexecutecannot accept a task. This may occur when no more threads or queue slots are available because their bounds would be exceeded, or upon shutdown of the Executor.In the absence of other alternatives, the method may throw an unchecked
RejectedExecutionException, which will be propagated to the caller ofexecute.- Specified by:
rejectedExecutionin interfacejava.util.concurrent.RejectedExecutionHandler- Parameters:
r- the runnable task requested to be executedexecutor- the executor attempting to execute this task
-
-