com.ebay.carad.os.vitalsigns.dataretrievers
Class DifferenceQueryLogger

java.lang.Object
  extended by com.ebay.carad.os.vitalsigns.dataretrievers.QueryLogger
      extended by com.ebay.carad.os.vitalsigns.dataretrievers.DifferenceQueryLogger
All Implemented Interfaces:
IDataRetriever, ITemplatizable, java.lang.Cloneable
Direct Known Subclasses:
DifferenceQueryRateLogger

public class DifferenceQueryLogger
extends QueryLogger

Takes the output of a simple one-cell query (column name "data") from the DB and logs the DIFFERENCE between the last time the query was run and the current run. The first time it is invoked it does not log anything.

Data that is logged = CurrentCount - LastCount

Version:
$Id$
Author:
Jeremy Kraybill, Jeremy Thomerson

Field Summary
private  java.lang.Float lastCount
           
private static org.apache.log4j.Logger LOGGER
           
 
Fields inherited from class com.ebay.carad.os.vitalsigns.dataretrievers.QueryLogger
ZERO
 
Fields inherited from interface com.ebay.carad.os.vitalsigns.IDataRetriever
NO_OP_DATA_RETRIEVER
 
Constructor Summary
DifferenceQueryLogger()
          Basic constructor.
 
Method Summary
 java.lang.Float getData()
           
 java.lang.Float getValue()
           
 
Methods inherited from class com.ebay.carad.os.vitalsigns.dataretrievers.QueryLogger
clone, getData, getQuery, getSqlDAO, setQuery, setSqlDAO, templatize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final org.apache.log4j.Logger LOGGER

lastCount

private java.lang.Float lastCount
Constructor Detail

DifferenceQueryLogger

public DifferenceQueryLogger()
Basic constructor.

Method Detail

getValue

public java.lang.Float getValue()
Overrides:
getValue in class QueryLogger
See Also:
class comment for details, QueryLogger.getValue()

getData

public java.lang.Float getData()
Overrides:
getData in class QueryLogger


Copyright © 2004-2009. All Rights Reserved.