类 CacheMetricsRegistrar
java.lang.Object
org.springframework.boot.actuate.metrics.cache.CacheMetricsRegistrar
Register supported
Cache to a MeterRegistry.- 从以下版本开始:
- 2.0.0
- 作者:
- Stephane Nicoll
-
构造器概要
构造器构造器说明CacheMetricsRegistrar(io.micrometer.core.instrument.MeterRegistry registry, Collection<CacheMeterBinderProvider<?>> binderProviders) Creates a new registrar. -
方法概要
修饰符和类型方法说明booleanbindCacheToRegistry(Cache cache, io.micrometer.core.instrument.Tag... tags) Attempt to bind the specifiedCacheto the registry.protected Iterable<io.micrometer.core.instrument.Tag> getAdditionalTags(Cache cache) Return additionaltagsto be associated with the givenCache.
-
构造器详细资料
-
CacheMetricsRegistrar
public CacheMetricsRegistrar(io.micrometer.core.instrument.MeterRegistry registry, Collection<CacheMeterBinderProvider<?>> binderProviders) Creates a new registrar.- 参数:
registry- theMeterRegistryto usebinderProviders- theCacheMeterBinderProviderinstances that should be used to detect compatible caches
-
-
方法详细资料
-
bindCacheToRegistry
Attempt to bind the specifiedCacheto the registry. Returntrueif the cache is supported and was bound to the registry,falseotherwise.- 参数:
cache- the cache to handletags- the tags to associate with the metrics of that cache- 返回:
trueif thecacheis supported and was registered
-
getAdditionalTags
Return additionaltagsto be associated with the givenCache.- 参数:
cache- the cache- 返回:
- a list of additional tags to associate to that
cache.
-