Class RejectedExecutionHandlers

java.lang.Object
io.netty.util.concurrent.RejectedExecutionHandlers

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

    Fields
    Modifier and Type
    Field
    Description
    private static final RejectedExecutionHandler
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    Returns a RejectedExecutionHandler that will always just throw a RejectedExecutionException.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • RejectedExecutionHandlers

      private RejectedExecutionHandlers()
  • Method Details

    • reject

      public static RejectedExecutionHandler reject()
      Returns a RejectedExecutionHandler that will always just throw a RejectedExecutionException.
    • 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.