Commit 2400d4b3 authored by jianhua.zhang's avatar jianhua.zhang

tps峰值接口重新调整

parent 28547bf2
......@@ -110,10 +110,10 @@ public class Engine {
/*
合约事件数据抓取、处理
*/
this.contractEventHandler = new ContractEventHandler();
/* this.contractEventHandler = new ContractEventHandler();
this.contractEventFetcher = new ContractEventFetcher<>(this.contractEventHandler);
this.executor.execute(this.contractEventFetcher);
this.executor.execute(this.contractEventHandler);
this.executor.execute(this.contractEventHandler);*/
}
......
......@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@Slf4j
public class Executor {
private static final int SIZE = 6;
private static final int SIZE = 5;
private final List<AbstractJob> jobList = new ArrayList<>();
private final String name;
private ThreadPoolExecutor pool;
......@@ -29,7 +29,7 @@ public class Executor {
this.name = name;
this.pool = new ThreadPoolExecutor(SIZE, SIZE * 2, 10L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
new ExecutorThreadFactory());
log.info("初始化线程池 name:{} coreSize:{} maxSize:{}", name, SIZE, SIZE * 2);
log.info("初始化线程池 name:{} coreSize:{} maxSize:{}", name, SIZE, 10);
}
public void execute(final AbstractJob r) {
......@@ -43,7 +43,7 @@ public class Executor {
}
public void rebuild() {
this.pool = new ThreadPoolExecutor(SIZE, SIZE*2, 10L, TimeUnit.SECONDS,
this.pool = new ThreadPoolExecutor(SIZE, SIZE * 2, 10L, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(), new ExecutorThreadFactory());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment