Class AbstractProfileMonitor
java.lang.Object
clazzfish.jdbc.monitor.AbstractProfileMonitor
- All Implemented Interfaces:
ProfileMonitor
,Comparable<ProfileMonitor>
- Direct Known Subclasses:
JamonMonitor
,SimpleProfileMonitor
The Class AbstractProfileMonitor.
- Since:
- 27.12.2008
- Version:
- $Revision: 1.19 $
- Author:
- oliver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal int
compareTo
(ProfileMonitor other) The ProfileMonitor with the higher number of totals is considered as "greater".boolean
If we impmlement theComparable.compareTo(Object)
method we should also implement/overwrite theObject.equals(Object)
method.final String
Gets the last value as time string.int
hashCode()
Hash code.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface clazzfish.jdbc.monitor.ProfileMonitor
add, getActive, getAvg, getAvgActive, getFirstAccess, getHits, getLabel, getLastAccess, getLastValue, getMax, getMaxActive, getMin, getMonitors, getTotal, getUnits, reset, start, stop, toCsvHeadline, toCsvString, toShortString
-
Constructor Details
-
AbstractProfileMonitor
public AbstractProfileMonitor()
-
-
Method Details
-
compareTo
The ProfileMonitor with the higher number of totals is considered as "greater".- Specified by:
compareTo
in interfaceComparable<ProfileMonitor>
- Parameters:
other
- the other ProfileMonitor- Returns:
- 0 if both ProfileMonitors has the same result and the same label
-
getLastTime
Gets the last value as time string. It returns the same result asProfileMonitor.getLastValue()
but in a human readable format. The english locale is used for formatting because this method is normally used for logging (which should be normally done in English).- Specified by:
getLastTime
in interfaceProfileMonitor
- Returns:
- the last time (e.g. "42 seconds")
- Since:
- 1.4.2
-
equals
If we impmlement theComparable.compareTo(Object)
method we should also implement/overwrite theObject.equals(Object)
method. For the result of the equals method we use not the result ofComparable.compareTo(Object)
but the label of the other object. -
hashCode
-