MockReportManager.java
948 Bytes
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
package com.dianping.cat.consumer;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.dianping.cat.report.ReportManager;
import com.dianping.cat.report.DefaultReportManager.StoragePolicy;
public abstract class MockReportManager<T> implements ReportManager<T> {
private Set<String> m_set;
@Override
public void initialize() {
}
@Override
public Set<String> getDomains(long startTime) {
if (m_set == null) {
m_set = new HashSet<String>();
m_set.add("group");
}
return m_set;
}
@Override
public abstract T getHourlyReport(long startTime, String domain, boolean createIfNotExist);
@Override
public Map<String, T> getHourlyReports(long startTime) {
return null;
}
@Override
public Map<String, T> loadHourlyReports(long startTime, StoragePolicy policy, int index) {
return null;
}
@Override
public void storeHourlyReports(long startTime, StoragePolicy policy, int index) {
}
}