Class CachesEndpoint

java.lang.Object
io.micronaut.cache.management.CachesEndpoint

@Endpoint(id="caches", defaultEnabled=false) public class CachesEndpoint extends Object
Exposes an Endpoint to manage caches.
Since:
1.1.0
Author:
Marcel Overdijk, graemerocher
  • Field Details

  • Constructor Details

  • Method Details

    • getCaches

      @Read public reactor.core.publisher.Mono<Map<String,Object>> getCaches()
      Returns the caches as a Mono.
      Returns:
      The caches as a Mono
    • getCache

      @Read public reactor.core.publisher.Mono<Map<String,Object>> getCache(@NotBlank @Selector @NotBlank String name)
      Returns the cache as a Mono.
      Parameters:
      name - The name of the cache to retrieve
      Returns:
      The cache as a Mono
    • getCacheEntry

      @Read public reactor.core.publisher.Mono<Map<String,Object>> getCacheEntry(@NotBlank @Selector @NotBlank String name, @NotBlank @Selector @NotBlank String key)
      Returns a cache entry as a Mono, given a cache and a key within the provided cache.
      Parameters:
      name - The name of the cache
      key - the key within the cache to retrieve
      Returns:
      The cache entry as a Mono
    • invalidateCaches

      @Delete public reactor.core.publisher.Mono<Boolean> invalidateCaches()
      Invalidates all the caches.
      Returns:
      A maybe that emits a boolean.
    • invalidateCache

      @Delete public reactor.core.publisher.Mono<Boolean> invalidateCache(@NotBlank @Selector @NotBlank String name)
      Invalidates the cache.
      Parameters:
      name - The name of the cache to invalidate
      Returns:
      A maybe that emits a boolean if the operation was successful
    • invalidateCacheKey

      @Delete public reactor.core.publisher.Mono<Boolean> invalidateCacheKey(@NotBlank @Selector @NotBlank String name, @NotBlank @Selector @NotBlank String key)
      Invalidates a key within the provided cache.
      Parameters:
      name - The name of the cache
      key - the key within the cache to invalidate
      Returns:
      A maybe that emits a boolean if the operation was successful