Class AggregatedSlidingWindowTimeReservoir
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.core.AbstractSlidingWindowTimeReservoir<AggregatedValueObject>
-
- org.glassfish.jersey.server.internal.monitoring.AggregatedSlidingWindowTimeReservoir
-
- All Implemented Interfaces:
TimeReservoir<AggregatedValueObject>
class AggregatedSlidingWindowTimeReservoir extends AbstractSlidingWindowTimeReservoir<AggregatedValueObject>
Aggregated sliding window time reservoir stores aggregated measurements in a time window of given size. The resulting snapshot provides precise data as far as the granularity of aggregating trimmer is not concerned. The granularity of the trimmer determines the granularity of the data the snapshot provides. In other words, the aggregated value object is either included in the resulting measurements or not depending whether it was trimmed or not.
-
-
Field Summary
Fields Modifier and Type Field Description private AggregatingTrimmernotifier
-
Constructor Summary
Constructors Constructor Description AggregatedSlidingWindowTimeReservoir(long window, java.util.concurrent.TimeUnit windowUnit, long startTime, java.util.concurrent.TimeUnit startTimeUnit, AggregatingTrimmer notifier)Creates an aggregated sliding window reservoir.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UniformTimeSnapshotsnapshot(java.util.Collection<AggregatedValueObject> values, long timeInterval, java.util.concurrent.TimeUnit timeIntervalUnit, long time, java.util.concurrent.TimeUnit timeUnit)Subclasses are required to instantiateUniformTimeSnapshoton their own.-
Methods inherited from class org.glassfish.jersey.server.internal.monitoring.core.AbstractSlidingWindowTimeReservoir
getSnapshot, interval, size, update
-
-
-
-
Field Detail
-
notifier
private final AggregatingTrimmer notifier
-
-
Constructor Detail
-
AggregatedSlidingWindowTimeReservoir
public AggregatedSlidingWindowTimeReservoir(long window, java.util.concurrent.TimeUnit windowUnit, long startTime, java.util.concurrent.TimeUnit startTimeUnit, AggregatingTrimmer notifier)Creates an aggregated sliding window reservoir.- Parameters:
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 data
-
-
Method Detail
-
snapshot
protected UniformTimeSnapshot snapshot(java.util.Collection<AggregatedValueObject> values, long timeInterval, java.util.concurrent.TimeUnit timeIntervalUnit, long time, java.util.concurrent.TimeUnit timeUnit)
Description copied from class:AbstractSlidingWindowTimeReservoirSubclasses are required to instantiateUniformTimeSnapshoton their own.- Specified by:
snapshotin classAbstractSlidingWindowTimeReservoir<AggregatedValueObject>- Parameters:
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- Returns:
- The snapshot
-
-