01: /*
02: * Created on Dec 18, 2003
03: *
04: * To change the template for this generated file go to
05: * Window - Preferences - Java - Code Generation - Code and Comments
06: */
07: package org.continuent.sequoia.controller.monitoring;
08:
09: import org.continuent.sequoia.common.xml.DatabasesXmlTags;
10: import org.continuent.sequoia.common.xml.XmlComponent;
11:
12: /**
13: * @author niko
14: *
15: * To change the template for this generated type comment go to
16: * Window - Preferences - Java - Code Generation - Code and Comments
17: */
18: public abstract class Monitoring implements XmlComponent {
19: boolean active;
20:
21: /**
22: * Return all stats information in the form of a String
23: *
24: * @return stats information
25: */
26: public abstract String[][] getAllStatsInformation();
27:
28: /**
29: * Dump all stats using the current logger (INFO level).
30: */
31: public abstract void dumpAllStatsInformation();
32:
33: /**
34: * Clean the content of statistics, to avoid memory problems.
35: */
36: public abstract void cleanStats();
37:
38: /**
39: * @see org.continuent.sequoia.common.xml.XmlComponent#getXml()
40: */
41: public String getXml() {
42: StringBuffer info = new StringBuffer();
43: info.append("<" + DatabasesXmlTags.ELT_Monitoring + ">");
44: info.append(getXmlImpl());
45: info.append("</" + DatabasesXmlTags.ELT_Monitoring + ">");
46: return info.toString();
47: }
48:
49: /** Get implementation information */
50: protected abstract String getXmlImpl();
51:
52: /**
53: * Returns the active value.
54: *
55: * @return Returns the active.
56: */
57: public boolean isActive() {
58: return active;
59: }
60:
61: /**
62: * Sets the active value.
63: *
64: * @param active The active to set.
65: */
66: public void setActive(boolean active) {
67: this.active = active;
68: }
69: }
|