|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.time.DurationCapture
public class DurationCapture
A DurationCapture will measure time intervals.
newInstance(),
DurationCaptureTypeFactory| Nested Class Summary | |
|---|---|
static class |
DurationCapture.Interval
Saves the interval points and their data like name and time. |
protected static class |
DurationCapture.IntervalStatistic
Internal class for statistical data calculated for the DurationCapture.Interval instances. |
| Field Summary | |
|---|---|
static Class<? extends DurationCapture> |
implementationForDurationClass
Used by the factory method. |
protected Object |
intervalDefaultKey
|
protected Map<Object,DurationCapture.Interval> |
intervalKeyToIntervalMap
|
| Constructor Summary | |
|---|---|
protected |
DurationCapture()
Use newInstance() for creating an instance of this class. |
| Method Summary | |
|---|---|
String |
calculateIntervalStatisticLogMessage()
Returns the collected statistical informations for the intervals durations. |
protected Map<Object,DurationCapture.IntervalStatistic> |
calculateIntervalStatisticMap()
Calculates the statistical data for the interval and returns a map with the intervalKeys and a DurationCapture.IntervalStatistic
instance. |
protected DurationCapture.Interval |
determineInterval(Object key)
Returns an DurationCapture.Interval for the given key. |
long |
getDurationInMilliseconds()
Returns the needed time between measurement start and stop in milliseconds. |
long |
getDurationInMilliseconds(Object intervalKey)
Returns the needed time between measurement start and stop in milliseconds. |
long |
getInterimTimeInMilliseconds()
Returns the time since starting the measurement and now in milliseconds. |
long |
getInterimTimeInMilliseconds(Object intervalKey)
Returns the time since starting the measurement and now in milliseconds. |
List<Object> |
getIntervalKeyList()
Returns all available DurationCapture.Interval keys. |
protected boolean |
hasDefaultInterval()
Returns true, if there is an DurationCapture.Interval instance for the intervalDefaultKey. |
static DurationCapture |
newInstance()
Creates a new instance of this class. |
void |
resetTimer()
Sets the timer of the default DurationCapture.Interval back to zero. |
void |
resetTimers()
Resets the timer of all contained DurationCapture.Interval instances. |
DurationCapture |
startTimeMeasurement()
Starts the measurement of time. |
DurationCapture |
startTimeMeasurement(Object intervalKey)
Starts the time measurement which will relate to the given key. |
DurationCapture |
stopTimeMeasurement()
Stops the measurement of the time for the default DurationCapture.Interval. |
DurationCapture |
stopTimeMeasurement(Object intervalKey)
Stops the time measurement for the respective DurationCapture.Interval. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<Object,DurationCapture.Interval> intervalKeyToIntervalMap
protected Object intervalDefaultKey
public static Class<? extends DurationCapture> implementationForDurationClass
#createNewInstance| Constructor Detail |
|---|
protected DurationCapture()
newInstance() for creating an instance of this class.
| Method Detail |
|---|
public DurationCapture startTimeMeasurement(Object intervalKey)
intervalKey -
protected DurationCapture.Interval determineInterval(Object key)
DurationCapture.Interval for the given key.
key -
public DurationCapture startTimeMeasurement()
public void resetTimer()
DurationCapture.Interval back to zero.
public void resetTimers()
DurationCapture.Interval instances.
public DurationCapture stopTimeMeasurement()
DurationCapture.Interval.
public DurationCapture stopTimeMeasurement(Object intervalKey)
DurationCapture.Interval.
intervalKey -
protected Map<Object,DurationCapture.IntervalStatistic> calculateIntervalStatisticMap()
DurationCapture.IntervalStatistic
instance.
public long getDurationInMilliseconds()
getDurationInMilliseconds(Object)public long getDurationInMilliseconds(Object intervalKey)
intervalKey -
getDurationInMilliseconds()public long getInterimTimeInMilliseconds()
public long getInterimTimeInMilliseconds(Object intervalKey)
protected boolean hasDefaultInterval()
DurationCapture.Interval instance for the intervalDefaultKey.
public String calculateIntervalStatisticLogMessage()
public List<Object> getIntervalKeyList()
DurationCapture.Interval keys.
public static DurationCapture newInstance()
implementationForDurationClass
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||