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 package org.jrobin.core;
27
28 import java.io.IOException;
29
30 abstract class DataImporter {
31
32
33 abstract String getVersion() throws RrdException, IOException;
34
35 abstract long getLastUpdateTime() throws RrdException, IOException;
36
37 abstract long getStep() throws RrdException, IOException;
38
39 abstract int getDsCount() throws RrdException, IOException;
40
41 abstract int getArcCount() throws RrdException, IOException;
42
43
44 abstract String getDsName(int dsIndex) throws RrdException, IOException;
45
46 abstract String getDsType(int dsIndex) throws RrdException, IOException;
47
48 abstract long getHeartbeat(int dsIndex) throws RrdException, IOException;
49
50 abstract double getMinValue(int dsIndex) throws RrdException, IOException;
51
52 abstract double getMaxValue(int dsIndex) throws RrdException, IOException;
53
54
55 abstract double getLastValue(int dsIndex) throws RrdException, IOException;
56
57 abstract double getAccumValue(int dsIndex) throws RrdException, IOException;
58
59 abstract long getNanSeconds(int dsIndex) throws RrdException, IOException;
60
61
62 abstract String getConsolFun(int arcIndex) throws RrdException, IOException;
63
64 abstract double getXff(int arcIndex) throws RrdException, IOException;
65
66 abstract int getSteps(int arcIndex) throws RrdException, IOException;
67
68 abstract int getRows(int arcIndex) throws RrdException, IOException;
69
70
71 abstract double getStateAccumValue(int arcIndex, int dsIndex) throws RrdException, IOException;
72
73 abstract int getStateNanSteps(int arcIndex, int dsIndex) throws RrdException, IOException;
74
75 abstract double[] getValues(int arcIndex, int dsIndex) throws RrdException, IOException;
76
77 long getEstimatedSize() throws RrdException, IOException {
78 int dsCount = getDsCount();
79 int arcCount = getArcCount();
80 int rowCount = 0;
81 for (int i = 0; i < arcCount; i++) {
82 rowCount += getRows(i);
83 }
84 return RrdDef.calculateSize(dsCount, arcCount, rowCount);
85 }
86
87 void release() throws RrdException, IOException {
88
89 }
90
91 }