All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zaxxer.hikari.metrics.dropwizard.Dropwizard5MetricsTrackerFactory Maven / Gradle / Ivy

There is a newer version: 6.2.0
Show newest version
package com.zaxxer.hikari.metrics.dropwizard;

import com.zaxxer.hikari.metrics.IMetricsTracker;
import com.zaxxer.hikari.metrics.MetricsTrackerFactory;
import com.zaxxer.hikari.metrics.PoolStats;
import io.dropwizard.metrics5.MetricRegistry;

public class Dropwizard5MetricsTrackerFactory implements MetricsTrackerFactory
{
   private final MetricRegistry registry;

   public Dropwizard5MetricsTrackerFactory(final MetricRegistry registry)
   {
      this.registry = registry;
   }

   public MetricRegistry getRegistry()
   {
      return registry;
   }

   @Override
   public IMetricsTracker create(final String poolName, final PoolStats poolStats)
   {
      return new Dropwizard5MetricsTracker(poolName, poolStats, registry);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy