09052203:对这个资产展示使用线程池的方法去做,第五次优化代码
parent
dfa2e92b93
commit
845eaeedd8
|
@ -107,9 +107,9 @@ public class MysqlPool implements BasePool<Connection>{
|
||||||
return mysqlConn;
|
return mysqlConn;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if ((System.currentTimeMillis() - startTime)>this.etlDataScore.getMaxWaitTime()){
|
if ((System.currentTimeMillis() - startTime)>this.etlDataScore.getMaxWaitTime()){
|
||||||
// throw new MysqlConnException("连接超时!");
|
throw new MysqlConnException("连接超时!");
|
||||||
// }
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class DataValueServiceImpl extends ServiceImpl<DataValueMapper, DataValue
|
||||||
// 每批次查询的记录数
|
// 每批次查询的记录数
|
||||||
private static final int BATCH_SIZE = 1000;
|
private static final int BATCH_SIZE = 1000;
|
||||||
// 线程池大小
|
// 线程池大小
|
||||||
private static final int THREAD_POOL_SIZE = 100;
|
private static final int THREAD_POOL_SIZE = 19;
|
||||||
@Override
|
@Override
|
||||||
public List<DataValue> findTableValue(DataValueModel dataValueModel) {
|
public List<DataValue> findTableValue(DataValueModel dataValueModel) {
|
||||||
List<DataValue> dataValueList = new ArrayList<>();
|
List<DataValue> dataValueList = new ArrayList<>();
|
||||||
|
|
Loading…
Reference in New Issue