public final class RejectedExecutionHandlers
extends java.lang.Object
RejectedExecutionHandler
s.限定符和类型 | 方法和说明 |
---|---|
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.
|
static RejectedExecutionHandler |
reject()
Returns a
RejectedExecutionHandler that will always just throw a RejectedExecutionException . |
public static RejectedExecutionHandler reject()
RejectedExecutionHandler
that will always just throw a RejectedExecutionException
.public static RejectedExecutionHandler backoff(int retries, long backoffAmount, java.util.concurrent.TimeUnit unit)
EventExecutor.inEventLoop()
returns false
.