类 CachesEndpoint
- java.lang.Object
- org.springframework.boot.actuate.cache.CachesEndpoint
@Endpoint(id="caches") public class CachesEndpoint extends Object
Endpointto expose availablecaches.- 从以下版本开始:
- 2.1.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classCachesEndpoint.CacheDescriptorBasic description of aCache, primarily intended for serialization to JSON.static classCachesEndpoint.CacheEntryDescription of aCache, primarily intended for serialization to JSON.static classCachesEndpoint.CacheManagerDescriptorDescription of aCacheManager, primarily intended for serialization to JSON.static classCachesEndpoint.CachesReportA report of availablecaches, primarily intended for serialization to JSON.
构造器概要
构造器 构造器 说明 CachesEndpoint(Map<String,org.springframework.cache.CacheManager> cacheManagers)Create a new endpoint with theCacheManagerinstances to use.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 CachesEndpoint.CacheEntrycache(String cache, String cacheManager)Return aCachesEndpoint.CacheDescriptorfor the specified cache.CachesEndpoint.CachesReportcaches()Return aCachesEndpoint.CachesReportof all availablecaches.booleanclearCache(String cache, String cacheManager)Clear the specificCache.voidclearCaches()Clear all the availablecaches.
构造器详细资料
CachesEndpoint
public CachesEndpoint(Map<String,org.springframework.cache.CacheManager> cacheManagers)
Create a new endpoint with theCacheManagerinstances to use.- 参数:
cacheManagers- the cache managers to use, indexed by name
方法详细资料
caches
@ReadOperation public CachesEndpoint.CachesReport caches()
Return aCachesEndpoint.CachesReportof all availablecaches.- 返回:
- a caches reports
cache
@ReadOperation public CachesEndpoint.CacheEntry cache(@Selector String cache, @Nullable String cacheManager)
Return aCachesEndpoint.CacheDescriptorfor the specified cache.- 参数:
cache- the name of the cachecacheManager- the name of the cacheManager (can benull- 返回:
- the descriptor of the cache or
nullif no such cache exists - 抛出:
NonUniqueCacheException- if more than one cache with that name exists and nocacheManagerwas provided to identify a unique candidate
clearCaches
@DeleteOperation public void clearCaches()
Clear all the availablecaches.
clearCache
@DeleteOperation public boolean clearCache(@Selector String cache, @Nullable String cacheManager)
Clear the specificCache.- 参数:
cache- the name of the cachecacheManager- the name of the cacheManager (can benullto match all)- 返回:
trueif the cache was cleared orfalseif no such cache exists- 抛出:
NonUniqueCacheException- if more than one cache with that name exists and nocacheManagerwas provided to identify a unique candidate