Package com.bytedesk.kbase.llm_text
Class TextExcelListener
java.lang.Object
com.bytedesk.kbase.llm_text.TextExcelListener
- All Implemented Interfaces:
com.alibaba.excel.event.Listener,com.alibaba.excel.read.listener.ReadListener<TextExcel>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收private List<TextEntity>缓存的数据private final Stringprivate final Stringprivate final Stringprivate final Stringprivate final TextRestService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoAfterAllAnalysed(com.alibaba.excel.context.AnalysisContext context) 所有数据解析完成了 都会来调用void这个每一条数据解析都会来调用private voidsaveData()加上存储数据库Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.alibaba.excel.read.listener.ReadListener
extra, hasNext, invokeHead, onException
-
Field Details
-
textRestService
-
kbType
-
fileUid
-
kbUid
-
orgUid
-
BATCH_COUNT
private static final int BATCH_COUNT每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收- See Also:
-
cachedDataList
缓存的数据
-
-
Constructor Details
-
TextExcelListener
public TextExcelListener()
-
-
Method Details
-
invoke
这个每一条数据解析都会来调用- Specified by:
invokein interfacecom.alibaba.excel.read.listener.ReadListener<TextExcel>
-
doAfterAllAnalysed
public void doAfterAllAnalysed(com.alibaba.excel.context.AnalysisContext context) 所有数据解析完成了 都会来调用- Specified by:
doAfterAllAnalysedin interfacecom.alibaba.excel.read.listener.ReadListener<TextExcel>
-
saveData
private void saveData()加上存储数据库
-