Class NoOpCache

  • All Implemented Interfaces:
    Cache

    public class NoOpCache
    extends AbstractCache
    This class is an internal Quarkus cache implementation. Do not use it explicitly from your Quarkus application. The public methods signatures may change without prior notice.
    • Constructor Detail

      • NoOpCache

        public NoOpCache()
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: Cache
        Returns the cache name.
        Returns:
        cache name
      • get

        public <K,​V> io.smallrye.mutiny.Uni<V> get​(K key,
                                                         Function<K,​V> valueLoader)
        Description copied from interface: Cache
        Returns a lazy asynchronous action that will emit the cache value identified by key, obtaining that value from valueLoader if necessary.
        Type Parameters:
        K - cache key type
        V - cache value type
        Parameters:
        key - cache key
        valueLoader - function used to compute a cache value if key is not already associated with a value
        Returns:
        a lazy asynchronous action that will emit a cache value
      • invalidate

        public io.smallrye.mutiny.Uni<Void> invalidate​(Object key)
        Description copied from interface: Cache
        Removes the cache entry identified by key from the cache. If the key does not identify any cache entry, nothing will happen.
        Parameters:
        key - cache key
      • invalidateAll

        public io.smallrye.mutiny.Uni<Void> invalidateAll()
        Description copied from interface: Cache
        Removes all entries from the cache.
      • replaceUniValue

        public io.smallrye.mutiny.Uni<Void> replaceUniValue​(Object key,
                                                            Object emittedValue)
        Description copied from class: AbstractCache
        Replaces the cache value associated with the given key by an item emitted by a Uni. This method can be called several times for the same key, each call will then always replace the existing cache entry with the given emitted value. If the key no longer identifies a cache entry, this method must not put the emitted item into the cache.
        Specified by:
        replaceUniValue in class AbstractCache