org.apache.jackrabbit.stats
Class TimeSeriesRecorder
java.lang.Object
org.apache.jackrabbit.stats.TimeSeriesRecorder
- All Implemented Interfaces:
- org.apache.jackrabbit.api.stats.TimeSeries
public class TimeSeriesRecorder
- extends Object
- implements org.apache.jackrabbit.api.stats.TimeSeries
Recorder of a time series. An instance of this class records (and clears)
the state of a given AtomicLong counter once every second and
exposes the collected time series through the TimeSeries
interface.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeSeriesRecorder
public TimeSeriesRecorder(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type)
TimeSeriesRecorder
public TimeSeriesRecorder(boolean resetValueEachSecond)
getCounter
public AtomicLong getCounter()
- Returns the
AtomicLong instance used to measure the value for
the time series.
- Returns:
- value
recordOneSecond
public void recordOneSecond()
- Records the number of measured values over the past second and resets
the counter. This method should be scheduled to be called once per
second.
getValuePerSecond
public long[] getValuePerSecond()
- Specified by:
getValuePerSecond in interface org.apache.jackrabbit.api.stats.TimeSeries
getValuePerMinute
public long[] getValuePerMinute()
- Specified by:
getValuePerMinute in interface org.apache.jackrabbit.api.stats.TimeSeries
getValuePerHour
public long[] getValuePerHour()
- Specified by:
getValuePerHour in interface org.apache.jackrabbit.api.stats.TimeSeries
getValuePerWeek
public long[] getValuePerWeek()
- Specified by:
getValuePerWeek in interface org.apache.jackrabbit.api.stats.TimeSeries
Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.