Class CallerRunsRejectOnShutdownPolicy
- java.lang.Object
-
- java.util.concurrent.ThreadPoolExecutor.AbortPolicy
-
- org.infinispan.commons.util.concurrent.CallerRunsRejectOnShutdownPolicy
-
- All Implemented Interfaces:
java.util.concurrent.RejectedExecutionHandler
public class CallerRunsRejectOnShutdownPolicy extends java.util.concurrent.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(java.lang.Runnable r, java.util.concurrent.ThreadPoolExecutor executor)
-
-
-
Method Detail
-
rejectedExecution
public void rejectedExecution(java.lang.Runnable r, java.util.concurrent.ThreadPoolExecutor executor)
- Specified by:
rejectedExecution
in interfacejava.util.concurrent.RejectedExecutionHandler
- Overrides:
rejectedExecution
in classjava.util.concurrent.ThreadPoolExecutor.AbortPolicy
-
-