类 DefaultCacheStatistics
- java.lang.Object
- org.springframework.boot.actuate.cache.DefaultCacheStatistics
- 所有已实现的接口:
CacheStatistics
public class DefaultCacheStatistics extends Object implements CacheStatistics
A defaultCacheStatistics
implementation.- 从以下版本开始:
- 1.3.0
构造器概要
构造器 构造器 说明 DefaultCacheStatistics()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Double
getHitRatio()
Return the ratio of cache requests which were hits as a value between 0 and 1 where 0 means that the hit ratio is 0% and 1 means it is 100%.Double
getMissRatio()
Return the ratio of cache requests which were misses as value between 0 and 1 where 0 means that the miss ratio is 0% and 1 means it is 100%.Long
getSize()
Return the size of the cache ornull
if that information is not available.void
setGetCacheCounts(long hitCount, long missCount)
void
setHitRatio(Double hitRatio)
void
setMissRatio(Double missRatio)
void
setSize(Long size)
Collection<Metric<?>>
toMetrics(String prefix)
Generate the relevantMetric
instances based on the specified prefix.
构造器详细资料
DefaultCacheStatistics
public DefaultCacheStatistics()
方法详细资料
toMetrics
public Collection<Metric<?>> toMetrics(String prefix)
从接口复制的说明:CacheStatistics
Generate the relevantMetric
instances based on the specified prefix.- 指定者:
toMetrics
在接口中CacheStatistics
- 参数:
prefix
- the metrics prefix (ends with '.')- 返回:
- the metrics corresponding to this instance
setGetCacheCounts
public void setGetCacheCounts(long hitCount, long missCount)
getSize
public Long getSize()
从接口复制的说明:CacheStatistics
Return the size of the cache ornull
if that information is not available.- 指定者:
getSize
在接口中CacheStatistics
- 返回:
- the size of the cache or
null
getHitRatio
public Double getHitRatio()
从接口复制的说明:CacheStatistics
Return the ratio of cache requests which were hits as a value between 0 and 1 where 0 means that the hit ratio is 0% and 1 means it is 100%.This may also return
null
if the cache-specifics statistics does not provide the necessary information- 指定者:
getHitRatio
在接口中CacheStatistics
- 返回:
- the hit ratio or
null
setHitRatio
public void setHitRatio(Double hitRatio)
getMissRatio
public Double getMissRatio()
从接口复制的说明:CacheStatistics
Return the ratio of cache requests which were misses as value between 0 and 1 where 0 means that the miss ratio is 0% and 1 means it is 100%.This may also return
null
if the cache-specifics statistics does not provide the necessary information- 指定者:
getMissRatio
在接口中CacheStatistics
- 返回:
- the miss ratio or
null
setMissRatio
public void setMissRatio(Double missRatio)