org.infinispan.client.hotrod.metrics.RemoteCacheManagerMetricsRegistry Maven / Gradle / Ivy
package org.infinispan.client.hotrod.metrics;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Supplier;
import org.infinispan.commons.stat.CounterTracker;
import org.infinispan.commons.stat.DistributionSummaryTracker;
import org.infinispan.commons.stat.TimerTracker;
/**
* Hot Rod client entrypoint.
*
* All metrics registered in this instance are considered global to the client. Per cache metrics are registered using
* {@link #withCache(String)}, where the cache's name is used to distinct the metrics. The implementation is responsible
* to separate each cache metric, because all caches register the same set of metrics (reads, writes, etc.).
*
* @since 15.1
*/
public interface RemoteCacheManagerMetricsRegistry extends HotRodClientMetricsRegistry {
RemoteCacheManagerMetricsRegistry DISABLED = new RemoteCacheManagerMetricsRegistry() {
@Override
public HotRodClientMetricsRegistry withCache(String cacheName) {
return HotRodClientMetricsRegistry.DISABLED;
}
@Override
public void removeCache(String cacheName) {
//no-op
}
@Override
public void createGauge(String metricName, String description, Supplier gauge, Map tags, Consumer