Class CachesEndpoint
java.lang.Object
org.springframework.boot.actuate.cache.CachesEndpoint
- Since:
- 2.1.0
- Author:
- Johannes Edmeier, Stephane Nicoll
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Description of aCache
.static final class
Description of aCache
entry.static final class
Description of aCacheManager
.static final class
Description of the caches. -
Constructor Summary
ConstructorDescriptionCachesEndpoint
(Map<String, CacheManager> cacheManagers) Create a new endpoint with theCacheManager
instances to use. -
Method Summary
Modifier and TypeMethodDescriptionReturn aCachesEndpoint.CacheDescriptor
for the specified cache.caches()
Return aCachesEndpoint.CachesDescriptor
of all availablecaches
.boolean
clearCache
(String cache, String cacheManager) Clear the specificCache
.void
Clear all the availablecaches
.
-
Constructor Details
-
CachesEndpoint
Create a new endpoint with theCacheManager
instances to use.- Parameters:
cacheManagers
- the cache managers to use, indexed by name
-
-
Method Details
-
caches
Return aCachesEndpoint.CachesDescriptor
of all availablecaches
.- Returns:
- a caches reports
-
cache
@ReadOperation public CachesEndpoint.CacheEntryDescriptor cache(@Selector String cache, @Nullable String cacheManager) Return aCachesEndpoint.CacheDescriptor
for the specified cache.- Parameters:
cache
- the name of the cachecacheManager
- the name of the cacheManager (can benull
- Returns:
- the descriptor of the cache or
null
if no such cache exists - Throws:
NonUniqueCacheException
- if more than one cache with that name exists and nocacheManager
was provided to identify a unique candidate
-
clearCaches
Clear all the availablecaches
. -
clearCache
Clear the specificCache
.- Parameters:
cache
- the name of the cachecacheManager
- the name of the cacheManager (can benull
to match all)- Returns:
true
if the cache was cleared orfalse
if no such cache exists- Throws:
NonUniqueCacheException
- if more than one cache with that name exists and nocacheManager
was provided to identify a unique candidate
-