类 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. -
方法概要
修饰符和类型方法说明boolean
bindCacheToRegistry
(Cache cache, io.micrometer.core.instrument.Tag... tags) Attempt to bind the specifiedCache
to the registry.protected Iterable
<io.micrometer.core.instrument.Tag> getAdditionalTags
(Cache cache) Return additionaltags
to be associated with the givenCache
.
-
构造器详细资料
-
CacheMetricsRegistrar
public CacheMetricsRegistrar(io.micrometer.core.instrument.MeterRegistry registry, Collection<CacheMeterBinderProvider<?>> binderProviders) Creates a new registrar.- 参数:
registry
- theMeterRegistry
to usebinderProviders
- theCacheMeterBinderProvider
instances that should be used to detect compatible caches
-
-
方法详细资料
-
bindCacheToRegistry
Attempt to bind the specifiedCache
to the registry. Returntrue
if the cache is supported and was bound to the registry,false
otherwise.- 参数:
cache
- the cache to handletags
- the tags to associate with the metrics of that cache- 返回:
true
if thecache
is supported and was registered
-
getAdditionalTags
Return additionaltags
to be associated with the givenCache
.- 参数:
cache
- the cache- 返回:
- a list of additional tags to associate to that
cache
.
-