org.logicalcobwebs.proxool.admin
Class Statistics

java.lang.Object
  extended by org.logicalcobwebs.proxool.admin.Statistics
All Implemented Interfaces:
StatisticsIF

 class Statistics
extends java.lang.Object
implements StatisticsIF

Implementation of StatisticsIF

Since:
Proxool 0.7
Version:
$Revision: 1.2 $, $Date: 2003/03/03 11:11:59 $
Author:
bill, $Author: billhorsman $ (current maintainer)

Field Summary
private  long refusedCount
           
private  long servedCount
           
private  java.util.Date startDate
           
private  java.util.Date stopDate
           
private  long totalActiveTime
           
 
Constructor Summary
protected Statistics(java.util.Date startDate)
           
 
Method Summary
protected  void connectionRefused()
           
protected  void connectionReturned(long activeTime)
           
 double getAverageActiveCount()
          The average number of active connections,
 double getAverageActiveTime()
          The average time that each connection spent active.
 long getPeriod()
          The length of time this sample represents,
 long getRefusedCount()
          The number of connections refused during this sample.
 double getRefusedPerSecond()
          The rate at which we have refused connections
 long getServedCount()
          The number of connections served during this sample.
 double getServedPerSecond()
          The rate at which we have served connections
 java.util.Date getStartDate()
          When this sample started.
 java.util.Date getStopDate()
          When this sample stopped
protected  void setStopDate(java.util.Date stopDate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startDate

private java.util.Date startDate

stopDate

private java.util.Date stopDate

servedCount

private long servedCount

refusedCount

private long refusedCount

totalActiveTime

private long totalActiveTime
Constructor Detail

Statistics

protected Statistics(java.util.Date startDate)
Parameters:
startDate - see StatisticsIF.getStartDate()
Method Detail

connectionReturned

protected void connectionReturned(long activeTime)
See Also:
Admin.connectionReturned(long)

connectionRefused

protected void connectionRefused()
See Also:
Admin.connectionRefused()

setStopDate

protected void setStopDate(java.util.Date stopDate)
See Also:
StatisticsIF.getStopDate()

getStartDate

public java.util.Date getStartDate()
Description copied from interface: StatisticsIF
When this sample started.

Specified by:
getStartDate in interface StatisticsIF
Returns:
startDate
See Also:
StatisticsIF.getStartDate()

getStopDate

public java.util.Date getStopDate()
Description copied from interface: StatisticsIF
When this sample stopped

Specified by:
getStopDate in interface StatisticsIF
Returns:
stopDate
See Also:
StatisticsIF.getStopDate()

getPeriod

public long getPeriod()
Description copied from interface: StatisticsIF
The length of time this sample represents,

Specified by:
getPeriod in interface StatisticsIF
Returns:
period (milliseconds)
See Also:
StatisticsIF.getPeriod()

getAverageActiveTime

public double getAverageActiveTime()
Description copied from interface: StatisticsIF
The average time that each connection spent active.

Specified by:
getAverageActiveTime in interface StatisticsIF
Returns:
averageActiveTime (milliseconds)
See Also:
StatisticsIF.getAverageActiveTime()

getAverageActiveCount

public double getAverageActiveCount()
Description copied from interface: StatisticsIF
The average number of active connections,

Specified by:
getAverageActiveCount in interface StatisticsIF
Returns:
averageActiveCount
See Also:
StatisticsIF.getAverageActiveCount()

getServedPerSecond

public double getServedPerSecond()
Description copied from interface: StatisticsIF
The rate at which we have served connections

Specified by:
getServedPerSecond in interface StatisticsIF
Returns:
servedPerSecond
See Also:
StatisticsIF.getServedPerSecond()

getRefusedPerSecond

public double getRefusedPerSecond()
Description copied from interface: StatisticsIF
The rate at which we have refused connections

Specified by:
getRefusedPerSecond in interface StatisticsIF
Returns:
refusedPerSecond
See Also:
StatisticsIF.getRefusedPerSecond()

getServedCount

public long getServedCount()
Description copied from interface: StatisticsIF
The number of connections served during this sample.

Specified by:
getServedCount in interface StatisticsIF
Returns:
servedCount
See Also:
StatisticsIF.getServedCount()

getRefusedCount

public long getRefusedCount()
Description copied from interface: StatisticsIF
The number of connections refused during this sample.

Specified by:
getRefusedCount in interface StatisticsIF
Returns:
refusedCount
See Also:
StatisticsIF.getRefusedCount()