Class JCacheCacheMeterBinderProvider

java.lang.Object
org.springframework.boot.actuate.metrics.cache.JCacheCacheMeterBinderProvider
All Implemented Interfaces:
CacheMeterBinderProvider<org.springframework.cache.jcache.JCacheCache>

public class JCacheCacheMeterBinderProvider extends Object implements CacheMeterBinderProvider<org.springframework.cache.jcache.JCacheCache>
CacheMeterBinderProvider implementation for JCache.
Since:
2.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a JCacheCacheMeterBinderProvider that registers cache removals as a Gauge.
    JCacheCacheMeterBinderProvider(boolean registerCacheRemovalsAsFunctionCounter)
    Creates a JCacheCacheMeterBinderProvider that registers cache removals with a meter type that depends on the value of registerCacheRemovalsAsFunctionCounter.
  • Method Summary

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JCacheCacheMeterBinderProvider

      public JCacheCacheMeterBinderProvider()
      Creates a JCacheCacheMeterBinderProvider that registers cache removals as a Gauge.
    • JCacheCacheMeterBinderProvider

      public JCacheCacheMeterBinderProvider(boolean registerCacheRemovalsAsFunctionCounter)
      Creates a JCacheCacheMeterBinderProvider that registers cache removals with a meter type that depends on the value of registerCacheRemovalsAsFunctionCounter. When false, cache removals are registered as a Gauge. When true, cache removals are registered as a FunctionCounter.
      Parameters:
      registerCacheRemovalsAsFunctionCounter - whether to register removals as a gauge or a function counter
      Since:
      3.4.12
  • Method Details

    • getMeterBinder

      public io.micrometer.core.instrument.binder.MeterBinder getMeterBinder(org.springframework.cache.jcache.JCacheCache cache, Iterable<io.micrometer.core.instrument.Tag> tags)
      Description copied from interface: CacheMeterBinderProvider
      Return the MeterBinder managing the specified Cache or null if the specified Cache is not supported.
      Specified by:
      getMeterBinder in interface CacheMeterBinderProvider<org.springframework.cache.jcache.JCacheCache>
      Parameters:
      cache - the cache to instrument
      tags - tags to apply to all recorded metrics
      Returns:
      a MeterBinder handling the specified Cache or null