All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.litongjava.tio.utils.thread.pool.TioCallerRunsPolicy Maven / Gradle / Ivy

There is a newer version: 3.7.3.v202400213-RELEASE
Show newest version
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);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy