org.apache.camel.management.mbean
Class Statistic

java.lang.Object
  extended by org.apache.camel.management.mbean.Statistic

public class Statistic
extends Object

Default implementation of Statistic


Nested Class Summary
static class Statistic.UpdateMode
          Statistics mode VALUE - A statistic with this update mode is a simple value that is a straight forward representation of the updated value. DIFFERENCE - A statistic with this update mode is a value that represents the difference between the last two recorded values (or the initial value if two updates have not been recorded). COUNTER - A statistic with this update mode interprets updates as increments (positive values) or decrements (negative values) to the current value. MAXIMUM - A statistic with this update mode is a value that represents the maximum value amongst the update values applied to this statistic. MINIMUM - A statistic with this update mode is a value that represents the minimum value amongst the update values applied to this statistic.
 
Constructor Summary
Statistic(String name, Object owner, Statistic.UpdateMode updateMode)
          Instantiates a new statistic.
 
Method Summary
 long getUpdateCount()
           
 long getValue()
           
 void increment()
           
 void reset()
           
 String toString()
           
 void updateValue(long newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Statistic

public Statistic(String name,
                 Object owner,
                 Statistic.UpdateMode updateMode)
Instantiates a new statistic.

Parameters:
name - name of statistic
owner - owner
updateMode - The statistic update mode.
Method Detail

updateValue

public void updateValue(long newValue)

increment

public void increment()

getValue

public long getValue()

getUpdateCount

public long getUpdateCount()

reset

public void reset()

toString

public String toString()
Overrides:
toString in class Object


Apache CAMEL