Interface CacheMeterBinderProvider<C extends Cache>

Type Parameters:
C - the cache type
All Known Implementing Classes:
Cache2kCacheMeterBinderProvider, CaffeineCacheMeterBinderProvider, HazelcastCacheMeterBinderProvider, JCacheCacheMeterBinderProvider, RedisCacheMeterBinderProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CacheMeterBinderProvider<C extends Cache>
Provide a MeterBinder based on a Cache.
Since:
2.0.0
Author:
Stephane Nicoll
  • Method Summary

    Modifier and Type
    Method
    Description
    io.micrometer.core.instrument.binder.MeterBinder
    getMeterBinder(C cache, Iterable<io.micrometer.core.instrument.Tag> tags)
    Return the MeterBinder managing the specified Cache or null if the specified Cache is not supported.
  • Method Details

    • getMeterBinder

      io.micrometer.core.instrument.binder.MeterBinder getMeterBinder(C cache, Iterable<io.micrometer.core.instrument.Tag> tags)
      Return the MeterBinder managing the specified Cache or null if the specified Cache is not supported.
      Parameters:
      cache - the cache to instrument
      tags - tags to apply to all recorded metrics
      Returns:
      a MeterBinder handling the specified Cache or null