Class Scheduler.ShutdownHandler
- java.lang.Object
-
- org.apache.maven.surefire.junitcore.pc.Scheduler.ShutdownHandler
-
- All Implemented Interfaces:
RejectedExecutionHandler
- Enclosing class:
- Scheduler
public class Scheduler.ShutdownHandler extends Object implements 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.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ShutdownHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
rejectedExecution(Runnable r, ThreadPoolExecutor executor)
void
setRejectedExecutionHandler(RejectedExecutionHandler poolHandler)
-
-
-
Method Detail
-
setRejectedExecutionHandler
public void setRejectedExecutionHandler(RejectedExecutionHandler poolHandler)
-
rejectedExecution
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor)
- Specified by:
rejectedExecution
in interfaceRejectedExecutionHandler
-
-