Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

juju.reattore.util
Class RateStat  view RateStat download RateStat.java

java.lang.Object
  extended byjuju.reattore.util.BaseStat
      extended byjuju.reattore.util.RateStat
All Implemented Interfaces:
Stat

public class RateStat
extends BaseStat

Statistic module that manages a rate of events.


Field Summary
private  long count
           
private  long lastUpdate
           
private  long total
           
 
Fields inherited from class juju.reattore.util.BaseStat
 
Constructor Summary
RateStat(java.lang.Class clazz, java.lang.String leaf)
           
 
Method Summary
 void add(int count)
          Adds a number of hits to this stat.
 long getCount()
          Get the total number of samples added.
protected  java.lang.String getDefaultFormat()
          Returns the default format string to use.
protected  java.lang.Object[] getFormatArgs()
          Returns the argument list used in formatting the summary.
 double getRunningRate()
          Get the number of hits per second since this method was last called.
 void inc()
          Cause a single hit on this stat.
 
Methods inherited from class juju.reattore.util.BaseStat
format, getName, setFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

private long count

total

private long total

lastUpdate

private long lastUpdate
Constructor Detail

RateStat

public RateStat(java.lang.Class clazz,
                java.lang.String leaf)
Method Detail

getCount

public long getCount()
Get the total number of samples added.


getRunningRate

public double getRunningRate()
Get the number of hits per second since this method was last called.


inc

public void inc()
Cause a single hit on this stat.


add

public void add(int count)
Adds a number of hits to this stat.


getDefaultFormat

protected java.lang.String getDefaultFormat()
Description copied from class: BaseStat
Returns the default format string to use.

Specified by:
getDefaultFormat in class BaseStat

getFormatArgs

protected java.lang.Object[] getFormatArgs()
Description copied from class: BaseStat
Returns the argument list used in formatting the summary.

Specified by:
getFormatArgs in class BaseStat