1
2
3
4
5
6
7
8
9
10
11
12
| package com.yami.trading.common.util;
|
| import java.util.concurrent.RejectedExecutionHandler;
| import java.util.concurrent.ThreadPoolExecutor;
|
| public class OffLineEventRejectExecutingHandler implements RejectedExecutionHandler {
|
| public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
| ThreadUtils.sleep(1000 * 10);
| executor.execute(r);
| }
| }
|
|