Class Scheduler.ShutdownHandler
- java.lang.Object
-
- org.apache.maven.surefire.junitcore.pc.Scheduler.ShutdownHandler
-
- All Implemented Interfaces:
java.util.concurrent.RejectedExecutionHandler
- Enclosing class:
- Scheduler
public class Scheduler.ShutdownHandler extends java.lang.Object implements java.util.concurrent.RejectedExecutionHandler
There is a way to shutdown the hierarchy of schedulers. You can do it in master scheduler viaScheduler.shutdownThreadPoolsAwaitingKilled()
which kills the current master and children recursively. If alternatively a sharedExecutorService
used by the master and children schedulers is shutdown from outside, then theScheduler.ShutdownHandler
is a hook calling currentScheduler.describeStopped(boolean)
. The methodScheduler.describeStopped(boolean)
is again shutting down children schedulers recursively as well.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.RejectedExecutionHandler
poolHandler
-
Constructor Summary
Constructors Modifier Constructor Description protected
ShutdownHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
rejectedExecution(java.lang.Runnable r, java.util.concurrent.ThreadPoolExecutor executor)
void
setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler poolHandler)
-
-
-
Method Detail
-
setRejectedExecutionHandler
public void setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler poolHandler)
-
rejectedExecution
public void rejectedExecution(java.lang.Runnable r, java.util.concurrent.ThreadPoolExecutor executor)
- Specified by:
rejectedExecution
in interfacejava.util.concurrent.RejectedExecutionHandler
-
-