Modifier and Type | Class and Description |
---|---|
static class |
CachesEndpoint.CacheDescriptor
Basic description of a
Cache , primarily intended for serialization to JSON. |
static class |
CachesEndpoint.CacheEntry
Description of a
Cache , primarily intended for serialization to JSON. |
static class |
CachesEndpoint.CacheManagerDescriptor
Description of a
CacheManager , primarily intended for serialization to
JSON. |
static class |
CachesEndpoint.CachesReport
A report of available
caches , primarily intended for serialization to
JSON. |
Constructor and Description |
---|
CachesEndpoint(Map<String,CacheManager> cacheManagers)
Create a new endpoint with the
CacheManager instances to use. |
Modifier and Type | Method and Description |
---|---|
CachesEndpoint.CacheEntry |
cache(String cache,
String cacheManager)
Return a
CachesEndpoint.CacheDescriptor for the specified cache. |
CachesEndpoint.CachesReport |
caches()
Return a
CachesEndpoint.CachesReport of all available caches . |
boolean |
clearCache(String cache,
String cacheManager)
Clear the specific
Cache . |
void |
clearCaches()
Clear all the available
caches . |
public CachesEndpoint(Map<String,CacheManager> cacheManagers)
CacheManager
instances to use.cacheManagers
- the cache managers to use, indexed by name@ReadOperation public CachesEndpoint.CachesReport caches()
CachesEndpoint.CachesReport
of all available caches
.@ReadOperation public CachesEndpoint.CacheEntry cache(@Selector String cache, @Nullable String cacheManager)
CachesEndpoint.CacheDescriptor
for the specified cache.cache
- the name of the cachecacheManager
- the name of the cacheManager (can be null
null
if no such cache existsNonUniqueCacheException
- if more than one cache with that name exists and no
cacheManager
was provided to identify a unique candidate@DeleteOperation public void clearCaches()
caches
.@DeleteOperation public boolean clearCache(@Selector String cache, @Nullable String cacheManager)
Cache
.cache
- the name of the cachecacheManager
- the name of the cacheManager (can be null
to match all)true
if the cache was cleared or false
if no such cache
existsNonUniqueCacheException
- if more than one cache with that name exists and no
cacheManager
was provided to identify a unique candidate