com.ibm.websphere.monitor.jmx

Class Counter

  1. java.lang.Object
  2. extended bycom.ibm.websphere.monitor.meters.Meter
  3. extended bycom.ibm.websphere.monitor.jmx.Counter

  1. public class Counter
  2. extends com.ibm.websphere.monitor.meters.Meter
A counter is used to track and record metrics related to counted items such as processed requests, bytes read, or bytes written. Counted data must be monotonically increasing. Counters cannot appear to move backwards except on reset or wrap.

Constructor Summary

Constructor and Description
Counter()
Default constructor.
Counter(CounterReading reading,long currentValue,java.lang.String description,java.lang.String unit)
Constructor used during construction of proxy objects for MXBeans.

Method Summary

Modifier and Type Method and Description
  1. long
getCurrentValue()
  1. java.lang.String
getDescription()
  1. CounterReading
getReading()
  1. java.lang.String
getUnit()
Methods inherited from class com.ibm.websphere.monitor.meters.Meter
setDescription, setUnit
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Counter

  1. public Counter()
Default constructor.

Counter

  1. @ConstructorProperties(value={"reading","currentValue","description","unit"})
  2. public Counter( CounterReading reading,
  3. long currentValue,
  4. java.lang.String description,
  5. java.lang.String unit)
Constructor used during construction of proxy objects for MXBeans.

Method Detail

getCurrentValue

  1. public long getCurrentValue()
Returns:
current counter value

getReading

  1. public CounterReading getReading( )
Returns:
a snapshot of the counter value

getDescription

  1. public java.lang.String getDescription( )
Overrides:
getDescription in class com.ibm.websphere.monitor.meters.Meter
Returns:
description of the counter

getUnit

  1. public java.lang.String getUnit( )
Overrides:
getUnit in class com.ibm.websphere.monitor.meters.Meter
Returns:
unit of measurement for the counter