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
44
45
46
47
48
49
50
package com.walker.store;
 
import com.walker.connector.Address;
 
import java.util.List;
 
/**
 * 资源库,对数据中心存储各种形式的库做抽象定义。</p>
 * 主要还是使用关系数据库来存储各种数据,后续会加入NoSQL等形式的支持
 * @author shikeying
 * @date 2015年12月16日
 *
 */
public interface Repository {
 
    String getId();
    
    /**
     * 返回资源库定义的名字,对于数据库就是数据库名字。<br>
     * 这个是采集时定义的名字,不一定存在。
     * @return
     */
    String getDefineName();
    
    int getType();
    
    /**
     * 返回库信息,由子类重新定义具体细节
     * @return
     */
    Object getInfo();
    
    List<Address> getAddressList();
 
    /**
     * 主机列表数量
     * @return
     */
    int getAddressSize();
 
    /**
     * 设置采集任务时,定义的资源名字(计划名字,不一定存在)
     * @param name
     */
    void setDefineName(String name);
 
    public static final int TYPE_DATABASE = 0;
    public static final int TYPE_DFS = 1;
 
}