planetj.database.connection
Class DataEngineConnectionPool.RunningTotal

java.lang.Object
  |
  +--planetj.database.connection.DataEngineConnectionPool.RunningTotal
All Implemented Interfaces:
Cloneable, Serializable
Enclosing class:
DataEngineConnectionPool

public static final class DataEngineConnectionPool.RunningTotal
extends Object
implements Serializable, Cloneable

See Also:
Serialized Form

Constructor Summary
DataEngineConnectionPool.RunningTotal(String name)
          Creates a new RunningTotal
 
Method Summary
 long add(long time, long value)
          Adds a value to this RunningTotal
 void clear()
          Resets this RunningTotal
 double getAverage()
          Gets the average of all values added to this RunningTotal
 DataEngineConnectionPool.RunningTotal getClone()
          Clones this RunningTotal
 long getCount()
          Gets the number of values that have been added to this RunningTotal
 int getFailureCount()
          The number of values representing failures that have been added to this RunningTotal
 long getLastTime()
          Gets the last time a value was added to this RunningTotal
 long getMax()
          Gets the maximum value that has been added to this RunningTotal
 long getMin()
          Gets the minimum value that has been added to this RunningTotal
 String getName()
          Gets this RunningTotal's name
 long getTotal()
          Gets the sum of all the values that have been added to this RunningTotal
 String toString()
          Converts this RunningTotal to a String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataEngineConnectionPool.RunningTotal

public DataEngineConnectionPool.RunningTotal(String name)
Creates a new RunningTotal

Method Detail

getName

public String getName()
Gets this RunningTotal's name


clear

public void clear()
Resets this RunningTotal


add

public long add(long time,
                long value)
Adds a value to this RunningTotal

Parameters:
time - The time value was generated. (A negative value indicates a failure occurred.)
value - The value to add
Returns:
The sum of all the values in this RunningTotal (after adding the value)

getMax

public long getMax()
Gets the maximum value that has been added to this RunningTotal


getMin

public long getMin()
Gets the minimum value that has been added to this RunningTotal


getCount

public long getCount()
Gets the number of values that have been added to this RunningTotal


getTotal

public long getTotal()
Gets the sum of all the values that have been added to this RunningTotal


getLastTime

public long getLastTime()
Gets the last time a value was added to this RunningTotal


getAverage

public double getAverage()
Gets the average of all values added to this RunningTotal


getFailureCount

public int getFailureCount()
The number of values representing failures that have been added to this RunningTotal


getClone

public DataEngineConnectionPool.RunningTotal getClone()
Clones this RunningTotal


toString

public String toString()
Converts this RunningTotal to a String

Overrides:
toString in class Object