public class LoggingRejectedExecutionHandler extends Object implements RejectedExecutionHandler
RejectedExecutionHandler which logs
instead of throwing an exception (like e.g. ThreadPoolExecutor's default
ThreadPoolExecutor.AbortPolicy does) or just completely silently ignores the execute
(like e.g. ThreadPoolExecutor.DiscardPolicy does).
This logs an ERROR level message (because typically that's a real problem),
unless the ExecutorService.isShutdown() - then it logs only an INFO level message
(because typically that's "just" a shutdown ordering issue, and not a real problem).
| Constructor and Description |
|---|
LoggingRejectedExecutionHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
rejectedExecution(Runnable runnable,
ThreadPoolExecutor executor) |
public void rejectedExecution(Runnable runnable, ThreadPoolExecutor executor)
rejectedExecution in interface RejectedExecutionHandlerCopyright © 2018 OpenDaylight. All rights reserved.