public class TimeSeriesRecorder extends java.lang.Object implements 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(RepositoryStatistics.Type type) |
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.atomic.AtomicLong |
getCounter()
Returns the
AtomicLong instance used to measure the value for
the time series. |
long |
getMissingValue()
The value used to encode missing values i.e.
|
long[] |
getValuePerHour()
Returns the measured value per hour over the last week.
|
long[] |
getValuePerMinute()
Returns the measured value per minute over the last hour.
|
long[] |
getValuePerSecond()
Returns the measured value per second over the last minute.
|
long[] |
getValuePerWeek()
Returns the measured value per week over the last three years.
|
void |
recordOneSecond()
Records the number of measured values over the past second and resets
the counter.
|
public TimeSeriesRecorder(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 java.util.concurrent.atomic.AtomicLong getCounter()
AtomicLong
instance used to measure the value for
the time series.public void recordOneSecond()
public long getMissingValue()
TimeSeries
getMissingValue
in interface TimeSeries
public long[] getValuePerSecond()
TimeSeries
getValuePerSecond
in interface TimeSeries
public long[] getValuePerMinute()
TimeSeries
getValuePerMinute
in interface TimeSeries
public long[] getValuePerHour()
TimeSeries
getValuePerHour
in interface TimeSeries
public long[] getValuePerWeek()
TimeSeries
getValuePerWeek
in interface TimeSeries
Copyright © 2010 - 2020 Adobe. All Rights Reserved