FileDocCategorySizeDatePackage
Counter.javaAPI DocGlassfish v2 API4445Fri May 04 22:33:44 BST 2007com.sun.enterprise.admin.monitor.types

Counter

public class Counter extends MonitoredAttributeType
Monitored attribute type counter. An attribute of Counter type has following properties -
  • Attribute value is Byte, Short, Integer or Long
  • Attribute value is always greater than or equal to zero
  • Attribute value can only be incremented.
  • Attribute value can roll over and in that case a modulus value is defined.

Fields Summary
public static final Counter
BYTE
Useful object to denote a monitored attribute whose values are of type java.lang.Byte and maximum value is Byte.MAX_VALUE
public static final Counter
SHORT
Useful object to denote a monitored attribute whose values are of type java.lang.Short and maximum value is Short.MAX_VALUE
public static final Counter
INTEGER
Useful object to denote a monitored attribute whose values are of type java.lang.Integer and maximum value is Integer.MAX_VALUE
public static final Counter
LONG
Useful object to denote a monitored attribute whose values are of type java.lang.Long and maximum value is Long.MAX_VALUE
private Number
maxValue
Maximum value for this type
Constructors Summary
protected Counter(Class type, Number maxVal)
Create a Type "Counter Monitored Attribute" with specified java type (of the monitored attribute value) and specified maximum value.

param
type class of object returned as value for the monitored attribute
param
maxVal maximum possible value for this type of monitored attribute


                                                   
         
        super(type);
        maxValue = maxVal;
    
Methods Summary
public java.lang.NumbergetMaxValue()
Get maximum possible value for this counter. If the attribute value is higher than this number then it will be rolled over.

        return maxValue;