Class CallerRunsRejectOnShutdownPolicy
java.lang.Object
java.util.concurrent.ThreadPoolExecutor.AbortPolicy
org.infinispan.commons.util.concurrent.CallerRunsRejectOnShutdownPolicy
- All Implemented Interfaces:
RejectedExecutionHandler
A handler for rejected tasks that runs the rejected task
directly in the calling thread of the
execute
method. If
the executor was shutdown, it will instead throw a RejectedExecutionException
.- Since:
- 10.0
- Author:
- wburns
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
rejectedExecution
(Runnable r, ThreadPoolExecutor executor)
-
Constructor Details
-
CallerRunsRejectOnShutdownPolicy
public CallerRunsRejectOnShutdownPolicy()
-
-
Method Details
-
rejectedExecution
- Specified by:
rejectedExecution
in interfaceRejectedExecutionHandler
- Overrides:
rejectedExecution
in classThreadPoolExecutor.AbortPolicy
-