public class CacheStatisticsUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Stream<CacheStatistics> |
collectVCacheStats(com.atlassian.vcache.internal.RequestMetrics metrics)
Converts VCache metrics into a stream of
CacheStatistics objects. |
static Stream<CacheStatistics> |
convertVCacheMetrics(String cacheType,
Map<String,EnumMap<com.atlassian.vcache.internal.MetricLabel,? extends com.atlassian.vcache.internal.LongMetric>> cachesMetrics)
Converts VCaches statistics into stream of
CacheStatistics . |
static CacheStatistics |
fromVCacheStatistics(String name,
String cacheType,
EnumMap<com.atlassian.vcache.internal.MetricLabel,com.atlassian.vcache.internal.LongMetric> metrics)
Converts VCache statistics into
CacheStatistics object. |
static Map<String,Long> |
remoteStats(com.atlassian.vcache.internal.RequestMetrics metrics) |
public static Stream<CacheStatistics> collectVCacheStats(com.atlassian.vcache.internal.RequestMetrics metrics)
CacheStatistics
objects.metrics
- metrics to convertpublic static CacheStatistics fromVCacheStatistics(String name, String cacheType, EnumMap<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 Stream<CacheStatistics> convertVCacheMetrics(String cacheType, Map<String,EnumMap<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 © 2003–2016 Atlassian. All rights reserved.