Class CallerRunsRejectOnShutdownPolicy
- java.lang.Object
-
- java.util.concurrent.ThreadPoolExecutor.AbortPolicy
-
- org.infinispan.commons.util.concurrent.CallerRunsRejectOnShutdownPolicy
-
- All Implemented Interfaces:
RejectedExecutionHandler
public class CallerRunsRejectOnShutdownPolicy extends ThreadPoolExecutor.AbortPolicy
A handler for rejected tasks that runs the rejected task directly in the calling thread of theexecute
method. If the executor was shutdown, it will instead throw aRejectedExecutionException
.- Since:
- 10.0
- Author:
- wburns
-
-
Constructor Summary
Constructors Constructor Description CallerRunsRejectOnShutdownPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
rejectedExecution(Runnable r, ThreadPoolExecutor executor)
-
-
-
Method Detail
-
rejectedExecution
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor)
-
-