
org.frameworkset.tran.DataTran Maven / Gradle / Ivy
Show all versions of bboss-datatran-core Show documentation
package org.frameworkset.tran;
/**
* Copyright 2008 biaoping.yin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.frameworkset.elasticsearch.scroll.BreakableScrollHandler;
import org.frameworkset.soa.BBossStringWriter;
import org.frameworkset.tran.config.OutputConfig;
import org.frameworkset.tran.context.ImportContext;
import org.frameworkset.tran.metrics.ImportCount;
import org.frameworkset.tran.plugin.OutputPlugin;
import org.frameworkset.tran.status.LastValueWrapper;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
/**
*
Description:
*
* Copyright (c) 2018
* @Date 2019/10/27 9:50
* @author biaoping.yin
* @version 1.0
*/
public interface DataTran {
public Object buildSerialDatas(Object data,CommonRecord record);
public void beforeOutputData(BBossStringWriter writer);
public boolean isMultiOutputTran();
void setOutputPlugin(OutputPlugin outputPlugin);
public OutputPlugin getOutputPlugin();
public OutputConfig getOutputConfig();
/**
* 并行批处理导入
* @return
*/
String parallelBatchExecute( );
public AsynTranResultSet getAsynTranResultSet();
/**
* 串行批处理导入
* @return
*/
String batchExecute( );
/**
* 逐条导入
* @return
*/
String serialExecute( ) throws DataImportException;
public BreakableScrollHandler getBreakableScrollHandler();
void waitTasksComplete(final List tasks,
final ExecutorService service, Throwable exception, LastValueWrapper lastValue, final ImportCount totalCount ,
final TranErrorWrapper tranErrorWrapper , WaitTasksCompleteCallBack waitTasksCompleteCallBack, boolean reachEOFClosed);
ImportContext getImportContext();
BaseDataTran getParent();
}