Class DefaultMarshallerMetricsAccumulator
- java.lang.Object
-
- com.atlassian.confluence.impl.content.render.xhtml.analytics.DefaultMarshallerMetricsAccumulator
-
- All Implemented Interfaces:
MarshallerMetricsAccumulator
@ThreadSafe public class DefaultMarshallerMetricsAccumulator extends Object implements MarshallerMetricsAccumulator
Default implementation ofMarshallerMetricsAccumulator
. Seperately tracks metrics on a per-key basis.This class doesn't much care what the keys used are, as long as they have well-behaved equals and hashCode methods.
- Since:
- 5.8
-
-
Constructor Summary
Constructors Constructor Description DefaultMarshallerMetricsAccumulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull List<MarshallerMetrics>
getMetricsSnapshots(com.google.common.base.Predicate<? super MarshallerMetricsAccumulationKey> accumulationKeyFilter)
Obtain snapshots of all metrics recorded against keys of the given type so far@NonNull MarshallerMetricsCollector
newMetricsCollector(MarshallerMetricsAccumulationKey accumulationKey)
Obtain a collector for recording metrics
-
-
-
Method Detail
-
newMetricsCollector
public @NonNull MarshallerMetricsCollector newMetricsCollector(MarshallerMetricsAccumulationKey accumulationKey)
Description copied from interface:MarshallerMetricsAccumulator
Obtain a collector for recording metrics- Specified by:
newMetricsCollector
in interfaceMarshallerMetricsAccumulator
- Parameters:
accumulationKey
- The key against which these metrics will be accumulated. This key is client-specific, and *must* implement equals and hashCode properly.- Returns:
- A collector against which metrics can be recorded for the given key
-
getMetricsSnapshots
public @NonNull List<MarshallerMetrics> getMetricsSnapshots(com.google.common.base.Predicate<? super MarshallerMetricsAccumulationKey> accumulationKeyFilter)
Description copied from interface:MarshallerMetricsAccumulator
Obtain snapshots of all metrics recorded against keys of the given type so far- Specified by:
getMetricsSnapshots
in interfaceMarshallerMetricsAccumulator
- Parameters:
accumulationKeyFilter
- The filter which determines which accumulation keys we're interested in- Returns:
- An immutable collection of immutable metrics snapshots
-
-