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 of
MarshallerMetricsAccumulator
. 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 -
Method Summary
Modifier and TypeMethodDescription@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
-
Constructor Details
-
DefaultMarshallerMetricsAccumulator
public DefaultMarshallerMetricsAccumulator()
-
-
Method Details
-
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
-