...
/**
* Metric registry. Allows to get, add or remove metrics.
*
* @see IgniteMetrics
* @see ReadOnlyMetricRegistry
*/
@IgniteExperimental
public interface IgniteMetricRegistry extends ReadOnlyMetricRegistry {
/**
* Registers an int metric which value will be queried from the specified supplier.
*
* @return {@code True} if new metric was added. {@code False} is other metric already exists with the same name.
*/
boolean gauge(String name, IntSupplier supplier, @Nullable String desc);
/**
* Registers a long which value will be queried from the specified supplier.
*
* @return {@code True} if new metric was added. {@code False} is other metric already exists with the same name.
*/
boolean gauge(String name, LongSupplier supplier, @Nullable String desc);
/**
* Registers a double metric which value will be queried from the specified supplier.
*
* @return {@code True} if new metric was added. {@code False} is other metric already exists with the same name.
*/
boolean gauge(String name, DoubleSupplier supplier, @Nullable String desc);
/**
* Registers an object metric which value will be queried from the specified supplier.
*
* @return {@code True} if new metric was added. {@code False} is other metric already exists with the same name.
*/
<T> boolean gauge(String name, Supplier<T> supplier, Class<T> type, @Nullable String desc);
/**
* Registers a boolean metric which value will be queried from the specified supplier.
*
* @return {@code True} if new metric was added. {@code False} is other metric already exists with the same name.
*/
boolean gauge(String name, BooleanSupplier supplier, @Nullable String desc);
/**
* Registers an updatable int metric.
*
* @return New {@link IntValueMetric} or previous one with the same name. {@code Null} if previous metric exists and
* is not a {@link IntValueMetric}.
*/
@Nullable IntValueMetric intMetric(String name, @Nullable String desc);
/**
* Registers an updatable long metric.
*
* @return New {@link LongValueMetric} or previous one with the same name. {@code Null} if previous metric exists and
* is not a {@link LongValueMetric}.
*/
@Nullable LongValueMetric longMetric(String name, @Nullable String desc);
/**
* Registers an updatable long adder metric.
*
* @return New {@link LongValueMetric} or previous one with the same name. {@code Null} if previous metric exists and
* is not a {@link LongValueMetric}.
*/
@Nullable LongSumMetric longAdderMetric(String name, @Nullable String desc);
/**
* Registers an updatable double metric.
*
* @return New {@link DoubleValueMetric} or previous one with the same name. {@code Null} if previous metric exists and
* is not a {@link DoubleValueMetric}.
*/
@Nullable DoubleValueMetric doubleMetric(String name, @Nullable String desc);
/**
* Registers an updatable double metric.
*
* @param <T> Metric value type.
* @return New {@link CustomMetric} or previous one with the same name. {@code Null} if previous metric exists and
* is not a {@link CustomMetric}.
*/
@Nullable <T> AnyValueMetric<T> objectMetric(String name, Class<T> type, @Nullable String desc);
/**
* Removes metrics with the {@code name}.
*
* @param name Metric name..
*/
void remove(String name);
/** Resets all metrics of this metric registry. */
void reset();
}
...
To the package "org.apache.ignite.metric" we add:
Names like "LongMetric" or "ObjectMetric" we already have in the package "org.apache.ignite.spi.metric".
...
package org.apache.ignite.metric;
...