Interface MetricRegistry

All Known Implementing Classes:
WildFlyMetricRegistry

public interface MetricRegistry
Provides a registry of metrics.
  • Method Details

    • registerMetric

      void registerMetric(Metric metric, MetricMetadata metadata)
      Registers the given metric. Calls will block if another thread holds the registry read lock.
      Parameters:
      metric - the metric. Cannot be null
      metadata - metadata for the metric. Cannot be null
    • unregister

      void unregister(MetricID metricID)
      Unregisters the given metric, if it is registered. Calls will block if another thread holds the registry read lock.
      Parameters:
      metricID - the id for the metric. Cannot be null
    • readLock

      void readLock()
      Acquires a non-exclusive read lock that will cause calls from other threads to registerMetric(Metric, MetricMetadata) or unregister(MetricID) to block. Must be followed by a call to unlock().
    • unlock

      void unlock()
      Releases the non-exclusive lock obtained by a call to readLock().