public class TimeSeriesRecorder extends Object implements org.apache.jackrabbit.api.stats.TimeSeries
AtomicLong
counter once every second and
exposes the collected time series through the TimeSeries
interface.Constructor and Description |
---|
TimeSeriesRecorder(boolean resetValueEachSecond)
Same as
TimeSeriesRecorder(boolean, long) passing long for the 2nd argument |
TimeSeriesRecorder(boolean resetValueEachSecond,
long missingValue) |
TimeSeriesRecorder(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type) |
Modifier and Type | Method and Description |
---|---|
AtomicLong |
getCounter()
Returns the
AtomicLong instance used to measure the value for
the time series. |
long |
getMissingValue() |
long[] |
getValuePerHour() |
long[] |
getValuePerMinute() |
long[] |
getValuePerSecond() |
long[] |
getValuePerWeek() |
void |
recordOneSecond()
Records the number of measured values over the past second and resets
the counter.
|
public TimeSeriesRecorder(org.apache.jackrabbit.api.stats.RepositoryStatistics.Type type)
public TimeSeriesRecorder(boolean resetValueEachSecond)
TimeSeriesRecorder(boolean, long)
passing long for the 2nd argumentresetValueEachSecond
- Whether to reset value each secondpublic TimeSeriesRecorder(boolean resetValueEachSecond, long missingValue)
resetValueEachSecond
- Whether to reset value each secondmissingValue
- The value used to encode missing valuespublic AtomicLong getCounter()
AtomicLong
instance used to measure the value for
the time series.public void recordOneSecond()
public long getMissingValue()
getMissingValue
in interface org.apache.jackrabbit.api.stats.TimeSeries
public long[] getValuePerSecond()
getValuePerSecond
in interface org.apache.jackrabbit.api.stats.TimeSeries
public long[] getValuePerMinute()
getValuePerMinute
in interface org.apache.jackrabbit.api.stats.TimeSeries
public long[] getValuePerHour()
getValuePerHour
in interface org.apache.jackrabbit.api.stats.TimeSeries
public long[] getValuePerWeek()
getValuePerWeek
in interface org.apache.jackrabbit.api.stats.TimeSeries
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.