shikeying
2024-01-11 3b67e947e36133e2a40eb2737b15ea375e157ea0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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();
}