Class 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 the execute method. If the executor was shutdown, it will instead throw a RejectedExecutionException.
    Since:
    10.0
    Author:
    wburns
    • Constructor Detail

      • CallerRunsRejectOnShutdownPolicy

        public CallerRunsRejectOnShutdownPolicy()
    • Method Detail

      • rejectedExecution

        public void rejectedExecution​(java.lang.Runnable r,
                                      java.util.concurrent.ThreadPoolExecutor executor)