Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Custom Metrics are based on the New Metric System.
  • A custom Custom metric name always begins with the prefix "custom.".
  • GridMetricManager handles the custom metrics.

  • We should provide an API with ready-to-use simple metrics like LongMetric, DoubleMetric and a generic Metric.
  • Custom metrics management requires a permission.
  • We should document examples of effecient metrics implementations like LongAdder.

...

package org.apache.ignite;

public interface IgniteMetrics {

   <T extends Metric> T metric(T metric);

void longMetric(String name, LongSupplier valueSupplier, @Nullable String description);

LongConsumer longMetric(String name, @Nullable String description);

void doubleMetric(String name, DoubleSupplier valueSupplier, @Nullable String description);

DoubleConsumer doubleMetric(String name, @Nullable String description);

void booleanMetric(String name, BooleanSupplier valueSupplier, @Nullable String description);

Consumer<Boolean> booleanMetric(String name, @Nullable String description);

<T> void objectMetric(String name, Class<T> valueType, Supplier<T> valueSupplier, @Nullable String description);

<T> Consumer<T> objectMetric(String name, Class<T> valueType, @Nullable String description);

void removeMetric(String name);

ReadOnlyMetricRegistry registry(String name);
}

...