1
zj
2024-09-03 d05bf8e5ef3437c6fa18ef64458e84c590313b61
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package project.monitor.job.balanceof;
 
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
 
import kernel.util.ThreadUtils;
 
public class BalanceOffLineEventRejectExecutingHandler implements RejectedExecutionHandler {
 
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        //等1秒后重试
        ThreadUtils.sleep(200);
        executor.execute(r);
    }
}