com.litongjava.tio.utils.thread.pool.TioCallerRunsPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tio-utils Show documentation
Show all versions of tio-utils Show documentation
t-io is a aio framework for java
package com.litongjava.tio.utils.thread.pool;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author tanyaowu
*/
public class TioCallerRunsPolicy extends CallerRunsPolicy {
private static Logger log = LoggerFactory.getLogger(TioCallerRunsPolicy.class);
public TioCallerRunsPolicy() {
}
public void rejectedExecution(Runnable r, ThreadPoolExecutor e) {
log.error(r.getClass().getSimpleName());
super.rejectedExecution(r, e);
}
}