## org.apache.commons.monitoring Interface StatValue

All Known Subinterfaces:
Counter, Gauge
All Known Implementing Classes:

`public interface StatValue`

A `StatValue` is a numerical indicator of some monitored application state with support for simple statistics.

Author:
Nicolas De Loof

Nested Class Summary
`static interface` `StatValue.Listener`
Listener for StatValue events

Method Summary
` void` `addListener(StatValue.Listener listener)`

` long` `get()`

` long` `getMax()`

` double` `getMean()`

` long` `getMin()`

` Monitor` `getMonitor()`

` Role<? extends StatValue>` `getRole()`

` double` `getStandardDeviation()`
Compute the standard deviation : measures the dispersion of values around the average value = sqrt( variance ).
` Unit` `getUnit()`

` void` `removeListener(StatValue.Listener listener)`

` void` `reset()`
reset the statValue
` void` ```set(long l, Unit unit)```

` void` `setMonitor(Monitor monitor)`
Set the monitor this value is attached to

Method Detail

### get

`long get()`
Returns:
the value

### set

```void set(long l,
Unit unit)```
Parameters:
`l` - the value to set

### reset

`void reset()`
reset the statValue

### getMin

`long getMin()`
Returns:
the minimum value

### getMax

`long getMax()`
Returns:
the maximum value

### getMean

`double getMean()`
Returns:
the arithmetic mean value

### getStandardDeviation

`double getStandardDeviation()`
Compute the standard deviation : measures the dispersion of values around the average value = sqrt( variance ).

Returns:
the value standard deviation

### setMonitor

`void setMonitor(Monitor monitor)`
Set the monitor this value is attached to

Parameters:
`monitor` -

### getMonitor

`Monitor getMonitor()`
Returns:
the monitor this value is attached to

### getRole

`Role<? extends StatValue> getRole()`
Returns:
the role for this value in the monitor

### getUnit

`Unit getUnit()`
Returns:
the (primary) data unit

`void addListener(StatValue.Listener listener)`
`void removeListener(StatValue.Listener listener)`