Top Description Fields Constructors Methods
io.netty.util.concurrent

public final Class RejectedExecutionHandlers

extends Object
Class Inheritance
Imports
io.netty.util.internal.ObjectUtil, java.util.concurrent.RejectedExecutionException, .TimeUnit, java.util.concurrent.locks.LockSupport

Expose helper methods which create different RejectedExecutionHandlers.

Field Summary

Modifier and TypeField and Description
private static final RejectedExecutionHandler

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static RejectedExecutionHandler
backoff(final int retries, long backoffAmount, TimeUnit unit)

Tries to backoff when the task can not be added due restrictions for an configured amount of time.

public static RejectedExecutionHandler
reject()

Returns a RejectedExecutionHandler that will always just throw a RejectedExecutionException.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

REJECTback to summary
private static final RejectedExecutionHandler REJECT

Constructor Detail

RejectedExecutionHandlersback to summary
private RejectedExecutionHandlers()

Method Detail

backoffback to summary
public static RejectedExecutionHandler backoff(final int retries, long backoffAmount, 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.

rejectback to summary
public static RejectedExecutionHandler reject()

Returns a RejectedExecutionHandler that will always just throw a RejectedExecutionException.