Browse Source

修改pagecount

pull/2171/head
Jiaju Zhuang 3 years ago
parent
commit
f8a52ab18b
  1. 3
      src/main/java/com/alibaba/excel/read/listener/PageReadListener.java

3
src/main/java/com/alibaba/excel/read/listener/PageReadListener.java

@ -15,7 +15,7 @@ public class PageReadListener<T> implements ReadListener<T> {
/** /**
* Single handle the amount of data * Single handle the amount of data
*/ */
public static final int BATCH_COUNT = 3000; public static int BATCH_COUNT = 3000;
/** /**
* Temporary storage of data * Temporary storage of data
*/ */
@ -34,7 +34,6 @@ public class PageReadListener<T> implements ReadListener<T> {
cachedData.add(data); cachedData.add(data);
if (cachedData.size() >= BATCH_COUNT) { if (cachedData.size() >= BATCH_COUNT) {
consumer.accept(cachedData); consumer.accept(cachedData);
// 存储完成清理 list
cachedData = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT); cachedData = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
} }
} }

Loading…
Cancel
Save