Class RejectedExecutionHandlers


  • public final class RejectedExecutionHandlers
    extends java.lang.Object
    Expose helper methods which create different RejectedExecutionHandlers.
    • Constructor Detail

      • RejectedExecutionHandlers

        private RejectedExecutionHandlers()
    • Method Detail

      • backoff

        public static RejectedExecutionHandler backoff​(int retries,
                                                       long backoffAmount,
                                                       java.util.concurrent.TimeUnit unit)
        Tries to backoff when the task can not be added due restrictions for an configured amount of time. This is only done if the task was added from outside of the event loop which means EventExecutor.inEventLoop() returns false.