com.ebay.carad.os.vitalsigns.dataretrievers
Class DifferenceQueryRateLogger
java.lang.Object
com.ebay.carad.os.vitalsigns.dataretrievers.QueryLogger
com.ebay.carad.os.vitalsigns.dataretrievers.DifferenceQueryLogger
com.ebay.carad.os.vitalsigns.dataretrievers.DifferenceQueryRateLogger
- All Implemented Interfaces:
- IDataRetriever, ITemplatizable, java.lang.Cloneable
public class DifferenceQueryRateLogger
- extends DifferenceQueryLogger
Takes a difference query, and logs its value as a rate per time period. The
time period is specified in minutes, via the constructor.
Data that is logged = CurrentCount / (System.currentTimeMillis() - lastTimeStamp) * millisPerInterval
- Version:
- $Id$
- Author:
- Jeremy Kraybill, Jeremy Thomerson
Field Summary |
private long |
lastTick
|
private static org.apache.log4j.Logger |
LOGGER
Class logger. |
private long |
millisPer
|
Fields inherited from class com.ebay.carad.os.vitalsigns.dataretrievers.QueryLogger |
ZERO |
Method Summary |
java.lang.Float |
getData()
|
void |
setMinsPerTick(int minsPerTick)
Sets the number of minutes to calculate rate against. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
private static final org.apache.log4j.Logger LOGGER
- Class logger.
millisPer
private long millisPer
lastTick
private long lastTick
DifferenceQueryRateLogger
public DifferenceQueryRateLogger()
- Basic constructor.
setMinsPerTick
public void setMinsPerTick(int minsPerTick)
- Sets the number of minutes to calculate rate against. For instance, if you want to log
this data as a rate per minute, minsPerTick should be 1; per hour, 60; etc.
- Parameters:
minsPerTick
- the number of minutes per interval
getData
public java.lang.Float getData()
- Overrides:
getData
in class DifferenceQueryLogger
- See Also:
class comment for details
,
QueryLogger.getData()
Copyright © 2004-2009. All Rights Reserved.