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 -
Constructor Summary
ConstructorsConstructorDescriptionAggregatedSlidingWindowTimeReservoir
(long window, TimeUnit windowUnit, long startTime, TimeUnit startTimeUnit, AggregatingTrimmer notifier) Creates an aggregated sliding window reservoir. -
Method Summary
Modifier and TypeMethodDescriptionprotected UniformTimeSnapshot
snapshot
(Collection<AggregatedValueObject> values, long timeInterval, TimeUnit timeIntervalUnit, long time, TimeUnit timeUnit) Subclasses are required to instantiateUniformTimeSnapshot
on their own.Methods inherited from class org.glassfish.jersey.server.internal.monitoring.core.AbstractSlidingWindowTimeReservoir
getSnapshot, interval, size, update
-
Field Details
-
notifier
-
-
Constructor Details
-
AggregatedSlidingWindowTimeReservoir
public AggregatedSlidingWindowTimeReservoir(long window, TimeUnit windowUnit, long startTime, 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 Details
-
snapshot
protected UniformTimeSnapshot snapshot(Collection<AggregatedValueObject> values, long timeInterval, TimeUnit timeIntervalUnit, long time, TimeUnit timeUnit) Description copied from class:AbstractSlidingWindowTimeReservoir
Subclasses are required to instantiateUniformTimeSnapshot
on their own.- Specified by:
snapshot
in 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
-