class AggregatedSlidingWindowTimeReservoir extends AbstractSlidingWindowTimeReservoir<AggregatedValueObject>
Modifier and Type | Field and Description |
---|---|
private AggregatingTrimmer |
notifier |
Constructor and Description |
---|
AggregatedSlidingWindowTimeReservoir(long window,
java.util.concurrent.TimeUnit windowUnit,
long startTime,
java.util.concurrent.TimeUnit startTimeUnit,
AggregatingTrimmer notifier)
Creates an aggregated sliding window reservoir.
|
Modifier and Type | Method and Description |
---|---|
protected UniformTimeSnapshot |
snapshot(java.util.Collection<AggregatedValueObject> values,
long timeInterval,
java.util.concurrent.TimeUnit timeIntervalUnit,
long time,
java.util.concurrent.TimeUnit timeUnit)
Subclasses are required to instantiate
UniformTimeSnapshot on their own. |
getSnapshot, interval, size, update
private final AggregatingTrimmer notifier
public AggregatedSlidingWindowTimeReservoir(long window, java.util.concurrent.TimeUnit windowUnit, long startTime, java.util.concurrent.TimeUnit startTimeUnit, AggregatingTrimmer notifier)
window
- The time size of the windowwindowUnit
- The unit of the window sizestartTime
- The start time from when to calculate the statisticsstartTimeUnit
- The unit of the start timenotifier
- The aggregating trimmer that produces the aggregated dataprotected UniformTimeSnapshot snapshot(java.util.Collection<AggregatedValueObject> values, long timeInterval, java.util.concurrent.TimeUnit timeIntervalUnit, long time, java.util.concurrent.TimeUnit timeUnit)
AbstractSlidingWindowTimeReservoir
UniformTimeSnapshot
on their own.snapshot
in class AbstractSlidingWindowTimeReservoir<AggregatedValueObject>
values
- The values to create the snapshot fromtimeInterval
- The time interval this snapshot conforms totimeIntervalUnit
- The interval unit of the time intervaltime
- The time of the request of the snapshottimeUnit
- The unit of the time of the snapshot request