public final class CacheStatisticsUtils extends Object
Modifier and Type | Method and Description |
---|---|
static java.util.stream.Stream<CacheStatistics> |
convertVCacheMetrics(String cacheType,
Map<String,Map<com.atlassian.vcache.internal.MetricLabel,? extends com.atlassian.vcache.internal.LongMetric>> cachesMetrics)
Converts VCaches statistics into stream of
CacheStatistics . |
static CacheStatistics |
fromRequestListenerStatistics(com.atlassian.instrumentation.caches.RequestListener requestListener,
String cacheType)
Converts Atlassian Cache statistics gathered by
RequestListener into CacheStatistics object. |
static CacheStatistics |
fromVCacheStatistics(String name,
String cacheType,
Map<com.atlassian.vcache.internal.MetricLabel,com.atlassian.vcache.internal.LongMetric> metrics)
Converts VCache statistics into
CacheStatistics object. |
public static CacheStatistics fromRequestListenerStatistics(com.atlassian.instrumentation.caches.RequestListener requestListener, String cacheType)
RequestListener
into CacheStatistics
object.requestListener
- to convert.cacheType
- - type of a cache (C - regular cache, R - cached reference)public static CacheStatistics fromVCacheStatistics(String name, String cacheType, Map<com.atlassian.vcache.internal.MetricLabel,com.atlassian.vcache.internal.LongMetric> metrics)
CacheStatistics
object.name
- name of the cache.cacheType
- type of the cache (e.g. External, Request, JVM).metrics
- metrics gathered for the cache.public static java.util.stream.Stream<CacheStatistics> convertVCacheMetrics(String cacheType, Map<String,Map<com.atlassian.vcache.internal.MetricLabel,? extends com.atlassian.vcache.internal.LongMetric>> cachesMetrics)
CacheStatistics
.cacheType
- type of the cache (e.g. External, Request, JVM).cachesMetrics
- map containg cache name as a key and metrics for that cache as a value.CacheStatistics
Copyright © 2002-2023 Atlassian. All Rights Reserved.