ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/client/monitors/Queue__Monitor.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/monitors/Queue__Monitor.java (file contents):
Revision 1.7 by ajm, Thu Mar 22 22:34:18 2001 UTC vs.
Revision 1.8 by tdb, Fri Mar 23 02:32:49 2001 UTC

# Line 28 | Line 28 | public class Queue__Monitor extends MonitorSkeleton {
28       */
29      public final String REVISION = "$Revision$";
30      
31 +    /**
32 +     * A description of this monitor
33 +     */
34      public final String DESC = "Who watches the watchmen?";
35      
36      private final String SOURCE = "i-scream-server";
# Line 37 | Line 40 | public class Queue__Monitor extends MonitorSkeleton {
40   //---CONSTRUCTORS---
41  
42   //---PUBLIC METHODS---
43 <
43 >    
44 >    /**
45 >     * Analyse a packet of data, and generate an alert if
46 >     * necessary.
47 >     *
48 >     * @param packet the XMLPacket to analyse
49 >     */
50      public void analysePacket(XMLPacket packet) {
51          if (packet.getParam("packet.attributes.type").equals("queueStat")) {
52              String source = packet.getParam("packet.attributes.hashCode");
# Line 152 | Line 161 | public class Queue__Monitor extends MonitorSkeleton {
161      }
162  
163   //---PRIVATE METHODS---
164 <
164 >    
165 >    /**
166 >     * Checks a piece of current data, and returns the
167 >     * threshold it breaches, if any.
168 >     *
169 >     * @param qSize the size of a queue
170 >     * @param reg the Register for the host
171 >     * @return the threshold level breached, if any
172 >     */
173      private int checkAttributeThreshold(double qSize, Register reg) {
174          for(int thresholdLevel = Alert.thresholdLevels.length - 1; thresholdLevel >= 0; thresholdLevel--) {
175              if (reg.getThreshold(thresholdLevel) != -1.0) {
# Line 165 | Line 182 | public class Queue__Monitor extends MonitorSkeleton {
182      }
183  
184   //---ACCESSOR/MUTATOR METHODS---
185 <
185 >    
186 >    /**
187 >     * Returns a reference to a specific Queue for this
188 >     * monitor. This Queue returns only the data packets
189 >     * (based on type) that we want too look at.
190 >     *
191 >     * @return a reference to a Queue
192 >     */
193      protected Queue getQueue() {
194          return MonitorManager.getInstance().getOtherQueue();
195      }
# Line 188 | Line 212 | public class Queue__Monitor extends MonitorSkeleton {
212       * A reference to the configuration proxy in use
213       */
214      private ConfigurationProxy _cp = ConfigurationProxy.getInstance();
215 <
215 >    
216 >    /**
217 >     * A HashMap of Registers (or groups of Registers), one
218 >     * for each host we're monitoring.
219 >     */
220      private HashMap _hosts = new HashMap();
221  
222   //---STATIC ATTRIBUTES---

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines