net.java.dev.moskito.core.stats
Interface StatValue

All Known Implementing Classes:
StatValueImpl

public interface StatValue

This interface declares a generic statistic value that may record data series for certain Intervals synchronously. That means, that if there is more than one Interval registered, the same value will be collected in all of these intervals.
Furthermore this class provides some convenience methods to manipulate the value, possibly depending on comparison operations.

Author:
miros
See Also:
Interval

Method Summary
 void addInterval(Interval aInterval)
          This method adds the given Interval.
 void decrease()
          This method decreases the stored values for all Intervals by one.
 void decreaseByDouble(double aValue)
          This method decreases the current values of all registered Intervals by the given double value.
 void decreaseByInt(int aValue)
          This method decreases the current values of all registered Intervals by the given int value.
 void decreaseByLong(long aValue)
          This method decreases the current values of all registered Intervals by the given long value.
 String getName()
          This method returns the name of this statistic value.
 double getValueAsDouble()
          This method returns the absolute value as double.
 double getValueAsDouble(String aIntervalName)
          This method returns the current value of a specific Interval as double.
 int getValueAsInt()
          This method returns the absolute value as int.
 int getValueAsInt(String aIntervalName)
          This method returns the current value of a specific Interval as int.
 long getValueAsLong()
          This method returns the absolute value as long.
 long getValueAsLong(String aIntervalName)
          This method returns the current value of a specific Interval as long.
 void increase()
          This method increases the stored values for all Intervals by one.
 void increaseByDouble(double aValue)
          This method increases the current values of all registered Intervals by the given double value.
 void increaseByInt(int aValue)
          This method increases the current values of all registered Intervals by the given int value.
 void increaseByLong(long aValue)
          This method increases the current values of all registered Intervals by the given long value.
 void reset()
          This method resets the ValueHolders of all registered Intervals.
 void setDefaultValueAsDouble(double aValue)
          This method sets the default value that will be the initial value after an Interval was elapsed.
 void setDefaultValueAsInt(int aValue)
          This method sets the default value that will be the initial value after an Interval was elapsed.
 void setDefaultValueAsLong(long aValue)
          This method sets the default value that will be the initial value after an Interval was elapsed.
 void setValueAsDouble(double aValue)
          This method sets the given double value to be the current value of all registered Intervals.
 void setValueAsInt(int aValue)
          This method sets the given int value to be the current value of all registered Intervals.
 void setValueAsLong(long aValue)
          This method sets the given long value to be the current value of all registered Intervals.
 void setValueIfGreaterThanCurrentAsDouble(double aValue)
          This method sets the given double value to be the current value of all registered Intervals depending on the condition "current value < given value".
 void setValueIfGreaterThanCurrentAsInt(int aValue)
          This method sets the given int value to be the current value of all registered Intervals depending on the condition "current value < given value".
 void setValueIfGreaterThanCurrentAsLong(long aValue)
          This method sets the given long value to be the current value of all registered Intervals depending on the condition "current value < given value".
 void setValueIfLesserThanCurrentAsDouble(double aValue)
          This method sets the given double value to be the current value of all registered Intervals depending on the condition "current value > given value".
 void setValueIfLesserThanCurrentAsInt(int aValue)
          This method sets the given int value to be the current value of all registered Intervals depending on the condition "current value > given value".
 void setValueIfLesserThanCurrentAsLong(long aValue)
          This method sets the given long value to be the current value of all registered Intervals depending on the condition "current value > given value".
 

Method Detail

addInterval

void addInterval(Interval aInterval)
This method adds the given Interval. After every value manipulation will be delegated to this Interval too.

Parameters:
aInterval - the Interval to add

getName

String getName()
This method returns the name of this statistic value.

Returns:
the name

increase

void increase()
This method increases the stored values for all Intervals by one. Particularly, this includes the absolute value.


decrease

void decrease()
This method decreases the stored values for all Intervals by one. Particularly, this includes the absolute value.


getValueAsInt

int getValueAsInt()
This method returns the absolute value as int.

Returns:
the absolute value

getValueAsLong

long getValueAsLong()
This method returns the absolute value as long.

Returns:
the absolute value

getValueAsDouble

double getValueAsDouble()
This method returns the absolute value as double.

Returns:
the absolute value

getValueAsInt

int getValueAsInt(String aIntervalName)
This method returns the current value of a specific Interval as int.

Parameters:
aIntervalName - the name of the Interval or null to get the absolute value
Returns:
the current value

getValueAsLong

long getValueAsLong(String aIntervalName)
This method returns the current value of a specific Interval as long.

Parameters:
aIntervalName - the name of the Interval or null to get the absolute value
Returns:
the current value

getValueAsDouble

double getValueAsDouble(String aIntervalName)
This method returns the current value of a specific Interval as double.

Parameters:
aIntervalName - the name of the Interval or null to get the absolute value
Returns:
the current value

setValueAsInt

void setValueAsInt(int aValue)
This method sets the given int value to be the current value of all registered Intervals. Particularly, this includes the absolute value.
ATTENTION: The Intervals will not be resetted. So the measured values of the first next Interval cycles are invalid.

Parameters:
aValue - the new value

setValueAsLong

void setValueAsLong(long aValue)
This method sets the given long value to be the current value of all registered Intervals. Particularly, this includes the absolute value.
ATTENTION: The Intervals will not be resetted. So the measured values of the first next Interval cycles are invalid.

Parameters:
aValue - the new value

setValueAsDouble

void setValueAsDouble(double aValue)
This method sets the given double value to be the current value of all registered Intervals. Particularly, this includes the absolute value.
ATTENTION: The Intervals will not be resetted. So the measured values of the first next Interval cycles are invalid.

Parameters:
aValue - the new value

increaseByInt

void increaseByInt(int aValue)
This method increases the current values of all registered Intervals by the given int value. Particularly, this includes the absolute value.

Parameters:
aValue - the value to increment by

increaseByLong

void increaseByLong(long aValue)
This method increases the current values of all registered Intervals by the given long value. Particularly, this includes the absolute value.

Parameters:
aValue - the value to increment by

increaseByDouble

void increaseByDouble(double aValue)
This method increases the current values of all registered Intervals by the given double value. Particularly, this includes the absolute value.

Parameters:
aValue - the value to increment by

decreaseByInt

void decreaseByInt(int aValue)
This method decreases the current values of all registered Intervals by the given int value. Particularly, this includes the absolute value.

Parameters:
aValue - the value to decrement by

decreaseByLong

void decreaseByLong(long aValue)
This method decreases the current values of all registered Intervals by the given long value. Particularly, this includes the absolute value.

Parameters:
aValue - the value to decrement by

decreaseByDouble

void decreaseByDouble(double aValue)
This method decreases the current values of all registered Intervals by the given double value. Particularly, this includes the absolute value.

Parameters:
aValue - the value to decrement by

setDefaultValueAsLong

void setDefaultValueAsLong(long aValue)
This method sets the default value that will be the initial value after an Interval was elapsed. Typically, an Interval implementation will execute "currentValue = defaultValue" after it Interval period was over.

Parameters:
aValue - the new default value

setDefaultValueAsInt

void setDefaultValueAsInt(int aValue)
This method sets the default value that will be the initial value after an Interval was elapsed. Typically, an Interval implementation will execute "currentValue = defaultValue" after it Interval period was over.

Parameters:
aValue - the new default value

setDefaultValueAsDouble

void setDefaultValueAsDouble(double aValue)
This method sets the default value that will be the initial value after an Interval was elapsed. Typically, an Interval implementation will execute "currentValue = defaultValue" after it Interval period was over.

Parameters:
aValue - the new default value

reset

void reset()
This method resets the ValueHolders of all registered Intervals. Typically, an Interval implementation will execute "currentValue = defaultValue" on reset.


setValueIfGreaterThanCurrentAsLong

void setValueIfGreaterThanCurrentAsLong(long aValue)
This method sets the given long value to be the current value of all registered Intervals depending on the condition "current value < given value". Particularly, this includes the absolute value.
ATTENTION: The Intervals will not be resetted. So the measured values of the first next Interval cycles are invalid.

Parameters:
aValue - the new value

setValueIfGreaterThanCurrentAsInt

void setValueIfGreaterThanCurrentAsInt(int aValue)
This method sets the given int value to be the current value of all registered Intervals depending on the condition "current value < given value". Particularly, this includes the absolute value.
ATTENTION: The Intervals will not be resetted. So the measured values of the first next Interval cycles are invalid.

Parameters:
aValue - the new value

setValueIfGreaterThanCurrentAsDouble

void setValueIfGreaterThanCurrentAsDouble(double aValue)
This method sets the given double value to be the current value of all registered Intervals depending on the condition "current value < given value". Particularly, this includes the absolute value.
ATTENTION: The Intervals will not be resetted. So the measured values of the first next Interval cycles are invalid.

Parameters:
aValue - the new value

setValueIfLesserThanCurrentAsLong

void setValueIfLesserThanCurrentAsLong(long aValue)
This method sets the given long value to be the current value of all registered Intervals depending on the condition "current value > given value". Particularly, this includes the absolute value.
ATTENTION: The Intervals will not be resetted. So the measured values of the first next Interval cycles are invalid.

Parameters:
aValue - the new value

setValueIfLesserThanCurrentAsInt

void setValueIfLesserThanCurrentAsInt(int aValue)
This method sets the given int value to be the current value of all registered Intervals depending on the condition "current value > given value". Particularly, this includes the absolute value.
ATTENTION: The Intervals will not be resetted. So the measured values of the first next Interval cycles are invalid.

Parameters:
aValue - the new value

setValueIfLesserThanCurrentAsDouble

void setValueIfLesserThanCurrentAsDouble(double aValue)
This method sets the given double value to be the current value of all registered Intervals depending on the condition "current value > given value". Particularly, this includes the absolute value.
ATTENTION: The Intervals will not be resetted. So the measured values of the first next Interval cycles are invalid.

Parameters:
aValue - the new value


Copyright © 2006 MoSKito Project Team. All Rights Reserved.
MoSKito, the open source java monitoring framework