com.github.shoothzj.javatool.executor.SimpleLogRejectedExecutionHandler Maven / Gradle / Ivy
The newest version!
package com.github.shoothzj.javatool.executor;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
/**
* @author hezhangjian
*/
public class SimpleLogRejectedExecutionHandler implements RejectedExecutionHandler {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(SimpleLogRejectedExecutionHandler.class);
@Override
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
log.error("rejected runnable is {}, executor is {}", r, executor);
}
}