com.qiniu.interfaces.IDataSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qsuits Show documentation
Show all versions of qsuits Show documentation
qiniu-suits is a efficient tools for qiniu api implemented by java8.
package com.qiniu.interfaces;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.List;
public interface IDataSource {
String getSourceName();
void setSaveOptions(boolean saveTotal, String savePath, String format, String separator, List rmFields) throws IOException;
default void setRetryTimes(int retryTimes) {}
void export(R source, S saver, ILineProcess processor) throws Exception;
// 直接使用 export(source, saver, processor) 方法时可以不设置 processor
default void setProcessor(ILineProcess processor) {}
// 根据成员变量参数直接多线程处理数据源,由子类创建线程池在需要多线程情况下使用并实现
default void export() throws Exception {}
default void export(LocalDateTime startTime, long pauseDelay, long duration) throws Exception {}
}