Class MetricsService

java.lang.Object
io.vertx.mutiny.micrometer.MetricsService
All Implemented Interfaces:
MutinyDelegate

public class MetricsService extends Object implements MutinyDelegate
The metrics service mainly allows to return a snapshot of measured objects.
This service is derived and adapted from MetricsService in the vertx-dropwizard-metrics module.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Nick Scavelli, Joel Takvorian
See Also:
  • MetricsService
  • Field Details

  • Constructor Details

    • MetricsService

      public MetricsService(io.vertx.micrometer.MetricsService delegate)
      Create a new instance of MetricsService delegating to the given (non-null) instance of MetricsService.
    • MetricsService

      public MetricsService(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.micrometer.MetricsService getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • create

      public static MetricsService create(Measured measured)
      Creates a metric service for a given Measured object.
      Parameters:
      measured - the measured object
      Returns:
      the metrics service
    • getBaseName

      public String getBaseName()
      Returns:
      the base name of the measured object
    • metricsNames

      public Set<String> metricsNames()
      Returns:
      the known metrics names by this service
    • getMetricsSnapshot

      public io.vertx.core.json.JsonObject getMetricsSnapshot()
      Will return the metrics that correspond with the measured object, null if no metrics is available.

      Returns:
      the map of metrics where the key is the name of the metric (excluding the base name unless for the Vert.x object) and the value is the json data representing that metric
    • getMetricsSnapshot

      public io.vertx.core.json.JsonObject getMetricsSnapshot(String baseName)
      Will return the metrics that begins with the baseName, null if no metrics is available.

      Returns:
      the map of metrics where the key is the name of the metric and the value is the json data representing that metric
    • newInstance

      public static MetricsService newInstance(io.vertx.micrometer.MetricsService delegate)
      Creates a new instance of the MetricsService.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object