org.apache.maven.surefire.junitcore.pc
Class Scheduler.ShutdownHandler

java.lang.Object
  extended by 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 via Scheduler.shutdownThreadPoolsAwaitingKilled() which kills the current master and children recursively. If alternatively a shared ExecutorService used by the master and children schedulers is shutdown from outside, then the Scheduler.ShutdownHandler is a hook calling current Scheduler.describeStopped(boolean). The method Scheduler.describeStopped(boolean) is again shutting down children schedulers recursively as well.


Constructor Summary
protected Scheduler.ShutdownHandler()
           
 
Method Summary
 void rejectedExecution(Runnable r, ThreadPoolExecutor executor)
           
 void setRejectedExecutionHandler(RejectedExecutionHandler poolHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scheduler.ShutdownHandler

protected Scheduler.ShutdownHandler()
Method Detail

setRejectedExecutionHandler

public void setRejectedExecutionHandler(RejectedExecutionHandler poolHandler)

rejectedExecution

public void rejectedExecution(Runnable r,
                              ThreadPoolExecutor executor)
Specified by:
rejectedExecution in interface RejectedExecutionHandler


Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.