Package akka.dispatch

Class SaneRejectedExecutionHandler

  • All Implemented Interfaces:
    java.util.concurrent.RejectedExecutionHandler

    public class SaneRejectedExecutionHandler
    extends java.lang.Object
    implements java.util.concurrent.RejectedExecutionHandler
    The RejectedExecutionHandler used by Akka, it improves on CallerRunsPolicy by throwing a RejectedExecutionException if the executor isShutdown. (CallerRunsPolicy silently discards the runnable in this case, which is arguably broken)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void rejectedExecution​(java.lang.Runnable runnable, java.util.concurrent.ThreadPoolExecutor threadPoolExecutor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SaneRejectedExecutionHandler

        public SaneRejectedExecutionHandler()
    • Method Detail

      • rejectedExecution

        public void rejectedExecution​(java.lang.Runnable runnable,
                                      java.util.concurrent.ThreadPoolExecutor threadPoolExecutor)
        Specified by:
        rejectedExecution in interface java.util.concurrent.RejectedExecutionHandler