public class MetricUtils extends Object
GridMetricManager,
MetricRegistry| Modifier and Type | Field and Description |
|---|---|
static String |
INF
Histogram metric last interval high bound.
|
static String |
SEPARATOR
Metric name part separator.
|
| Constructor and Description |
|---|
MetricUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
cacheMetricsRegistryName(String cacheName,
boolean isNear) |
static boolean |
compareAndSet(AtomicLongMetric m,
long expect,
long update)
Atomically sets the value to the given updated value
if the current value
== the expected value. |
static T2<String,String> |
fromFullName(String name)
Splits full metric name to registry name and metric name.
|
static String[] |
histogramBucketNames(HistogramMetric metric,
Map<String,T2<long[],String[]>> cache)
Gets histogram bucket names.
|
static String |
metricName(String... names)
Builds metric name.
|
static void |
setIfGreater(AtomicLongMetric m,
long update)
Update metrics value only if current value if greater then
update. |
static void |
setIfLess(AtomicLongMetric m,
long update)
Update metrics value only if current value if less then
update. |
public static final String SEPARATOR
public static final String INF
public static String metricName(String... names)
names - Metric name parts.public static T2<String,String> fromFullName(String name)
name - Full metric name.public static String cacheMetricsRegistryName(String cacheName, boolean isNear)
cacheName - Cache name.isNear - Is near flag.public static boolean compareAndSet(AtomicLongMetric m, long expect, long update)
== the expected value.m - Metric.expect - The expected value.update - The new value.true if successful. False return indicates that
the actual value was not equal to the expected value.public static void setIfLess(AtomicLongMetric m, long update)
update.m - Metric to update.update - New value.public static void setIfGreater(AtomicLongMetric m, long update)
update.m - Metric to update.update - New value.public static String[] histogramBucketNames(HistogramMetric metric, Map<String,T2<long[],String[]>> cache)
metric - Histogram metric.cache - Map that caches computed bucket names.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020