public class MetricUtils extends Object
GridMetricManager
,
MetricRegistry
Modifier and Type | Field and Description |
---|---|
static char |
HISTOGRAM_NAME_DIVIDER
Histogram name divider.
|
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)
Generates 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 . |
static String |
toSqlName(String name)
Build SQL-like name from Java code style name.
|
public static final String SEPARATOR
public static final String INF
public static final char HISTOGRAM_NAME_DIVIDER
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)
metric
- Histogram metric
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021