com.zaxxer.hikari.metrics.micrometer.MicrometerMetricsTrackerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of HikariCP Show documentation
Show all versions of HikariCP Show documentation
Ultimate JDBC Connection Pool
package com.zaxxer.hikari.metrics.micrometer;
import com.zaxxer.hikari.metrics.IMetricsTracker;
import com.zaxxer.hikari.metrics.MetricsTrackerFactory;
import com.zaxxer.hikari.metrics.PoolStats;
import io.micrometer.core.instrument.MeterRegistry;
public class MicrometerMetricsTrackerFactory implements MetricsTrackerFactory
{
private final MeterRegistry registry;
public MicrometerMetricsTrackerFactory(MeterRegistry registry)
{
this.registry = registry;
}
@Override
public IMetricsTracker create(String poolName, PoolStats poolStats)
{
return new MicrometerMetricsTracker(poolName, poolStats, registry);
}
}