com.northconcepts.datapipeline.meter
Class Meter

java.lang.Object
  extended by com.northconcepts.datapipeline.meter.Meter

public class Meter
extends Object


Field Summary
static long E
           
static long G
           
static long K
           
static long M
           
static long P
           
static long T
           
 
Constructor Summary
Meter()
           
 
Method Summary
 void add()
           
 Meter add(long difference)
           
 DataException addExceptionProperties(DataException exception)
           
 long getCount()
           
 long getElapsedTime()
           
 long getStarted()
           
 double getUnitsPerSecond()
          Returns units per second.
 String getUnitsPerSecondAsString()
           
 String getUnitsPerSecondAsString(String units)
           
 boolean isRunning()
           
 Meter reset()
          restarts the timer and count.
 Meter stopTimer()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

K

public static final long K
See Also:
Constant Field Values

M

public static final long M
See Also:
Constant Field Values

G

public static final long G
See Also:
Constant Field Values

T

public static final long T
See Also:
Constant Field Values

P

public static final long P
See Also:
Constant Field Values

E

public static final long E
See Also:
Constant Field Values
Constructor Detail

Meter

public Meter()
Method Detail

reset

public Meter reset()
restarts the timer and count.


stopTimer

public Meter stopTimer()

isRunning

public boolean isRunning()

add

public void add()

add

public Meter add(long difference)

getCount

public long getCount()

getStarted

public long getStarted()

getElapsedTime

public long getElapsedTime()

getUnitsPerSecond

public double getUnitsPerSecond()
Returns units per second. A value less than zero (0) means the rate is undefined due to integer overflow and needs to be reset.

See Also:
reset()

toString

public String toString()
Overrides:
toString in class Object

getUnitsPerSecondAsString

public String getUnitsPerSecondAsString()

getUnitsPerSecondAsString

public String getUnitsPerSecondAsString(String units)

addExceptionProperties

public DataException addExceptionProperties(DataException exception)


Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.