/
AutoGraph.java
57 lines (47 loc) · 1.33 KB
/
AutoGraph.java
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
51
52
53
54
55
56
57
package jrds.graphe;
import java.util.Arrays;
import jrds.Graph;
import jrds.GraphDesc;
import jrds.GraphNode;
import jrds.Probe;
import jrds.PropertiesManager;
import org.apache.log4j.Logger;
public class AutoGraph extends GraphNode {
public enum Operation {
SUM, MIN, MAX, AVERAGE
}
static final private Logger logger = Logger.getLogger(AutoGraph.class);
static int i;
Operation op;
public AutoGraph(Probe<?, ?> theStore, Operation op) {
super(theStore, new GraphDesc() {
String name = "autograph" + i++;
/*
* (non-Javadoc)
*
* @see jrds.GraphDesc#getGraphName()
*/
@Override
public String getGraphName() {
return name;
}
});
GraphDesc gd = this.getGraphDesc();
gd.setGraphName(theStore.getName());
gd.setGraphTitle(theStore.getName());
gd.setName(theStore.getName());
gd.setTree(PropertiesManager.HOSTSTAB, Arrays.<Object> asList(GraphDesc.TITLE));
logger.debug(this.getQualifiedName());
this.op = op;
}
/*
* (non-Javadoc)
*
* @see jrds.GraphNode#getGraph()
*/
@Override
public Graph getGraph() {
logger.debug("Wants to graph a AutoGraph");
return null;
}
}