Class AbstractCache

    • Constructor Detail

      • AbstractCache

        public AbstractCache()
    • Method Detail

      • getDefaultKey

        public Object getDefaultKey()
        Description copied from interface: Cache
        Returns the unique and immutable default key for the current cache. This key is used by the annotations caching API when a no-args method annotated with CacheResult or CacheInvalidate is invoked. It can also be used with the programmatic caching API.
        Specified by:
        getDefaultKey in interface Cache
        Returns:
        default cache key
      • as

        public <T extends Cache> T as​(Class<T> type)
        Description copied from interface: Cache
        Returns this cache as an instance of the provided type if possible.
        Specified by:
        as in interface Cache
        Returns:
        cache instance of the provided type
      • replaceUniValue

        public abstract io.smallrye.mutiny.Uni<Void> replaceUniValue​(Object key,
                                                                     Object emittedValue)
        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.