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/Register.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/Register.java (file contents):
Revision 1.2 by ajm, Sun Mar 4 02:41:16 2001 UTC vs.
Revision 1.3 by ajm, Sun Mar 4 05:23:41 2001 UTC

# Line 46 | Line 46 | public class Register {
46          _monitorName = monitorName;
47          _lastAlertLevels = new int[numAttributes];
48          _lastThresholdLevels = new int[numAttributes];
49 +        _lastAlertTimeout = new long[numAttributes];
50          _times = new long[numAttributes][Alert.alertLevels.length];
51          // initialise the arrays to 0
52          for (int x = 0; x < _lastAlertLevels.length; x++) {
53              _lastAlertLevels[x] = 0;
54              _lastThresholdLevels[x] = 0;
55 +            _lastAlertTimeout[x] = 0;
56              for(int y = 0; y < Alert.alertLevels.length; y++) {
57                  _times[x][y] = 0;
58              }
# Line 206 | Line 208 | public class Register {
208      }
209  
210      /**
211 +     * Gets the timeout value of the last alert
212 +     * sent
213 +     *
214 +     * @param attrubuteNum the attribute to get the last timeout for
215 +     * @return the last timeout value
216 +     */
217 +    public long getLastAlertTimeout(int attributeNum) {
218 +        return _lastAlertTimeout[attributeNum];
219 +    }
220 +    
221 +    /**
222 +     * Sets the timeout value of the last alert
223 +     * sent
224 +     *
225 +     * @param attrubuteNum the attribute to get the last timeout for
226 +     * @param timeout the new value
227 +     */
228 +    public void setLastAlertTimeout(int attributeNum, long timeout) {
229 +        _lastAlertTimeout[attributeNum] = timeout;
230 +    }
231 +
232 +    /**
233       * Advances the alert level to the next one up.
234       *
235       * @param attributeNum the attribute to advance the alert for
# Line 239 | Line 263 | public class Register {
263       * after.
264       */
265      private int[] _lastThresholdLevels;
266 +    
267 +    /**
268 +     * An array of last alert timeout levels for
269 +     * each attribute this register is looking
270 +     * after.
271 +     */
272 +    private long[] _lastAlertTimeout;
273      
274      /**
275       * An array of arrays containing

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines