package com.walker.store;
|
|
import java.util.List;
|
|
/**
|
* 存储数据规范定义,所有需要存储到数据中心的数据,都必须按照此规范来实现存储方式
|
* @author shikeying
|
* @date 2015年12月15日
|
*
|
*/
|
public interface Storeable {
|
|
String getId();
|
|
String getDescription();
|
|
/**
|
* 写入到系统存储中心
|
* @param srcName 写入源原始名称,例如:数据库表名或者分布式系统文件名
|
* @param createTableSQL 创建表结构SQL
|
* @param parameter 业务传递的参数,用于根据策略生成目的地址
|
* @param datas 写入的数据
|
*/
|
void write(String srcName, String createTableSQL, Object parameter, List<Object> datas) throws Exception;
|
|
void setStoreStrategy(StoreStrategy storeStrategy);
|
|
/**
|
* 初始化,创建该对象后必须首先调用该方法。
|
*/
|
void initialize();
|
|
/**
|
* 使用完该对象,必须调用该方法销毁
|
*/
|
void destroy();
|
|
void setMetaDataEngine(MetaDataEngine metaDataEngine);
|
|
MetaDataEngine getMetaDataEngine();
|
|
StoreStrategy getStoreStrategy();
|
}
|