class CounterRejectedExecutionHandler implements RejectedExecutionHandler {
	
    private Logger logger = LoggerFactory.getLogger(CounterRejectedExecutionHandler.class);
	
    public static final AtomicLongMap<String> THREAD_POOL_REJECT_MAP = AtomicLongMap.create();
    
	@Override
	public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {<FILL_FUNCTION_BODY>}

}

		NamedThreadFactory namedThreadFactory = (NamedThreadFactory) executor.getThreadFactory();
		String threadPoolName = namedThreadFactory.getThreadPoolName();
		if (StringUtils.isBlank(threadPoolName)) {
			logger.warn("threadPoolName is null");
			return;
		}
		THREAD_POOL_REJECT_MAP.getAndIncrement(threadPoolName);
		throw new RejectedExecutionException("Task " + r.toString() +
                " rejected from " +
                executor.toString());
	
<no_super_class>