Package io.quarkus.cache.redis.runtime
Interface RedisCache
-
- All Superinterfaces:
Cache
- All Known Implementing Classes:
RedisCacheImpl
public interface RedisCache extends Cache
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <K,V>
io.smallrye.mutiny.Uni<V>get(K key, Class<V> clazz, Function<K,V> valueLoader)Allows retrieving a value from the Redis cache.default <K,V>
io.smallrye.mutiny.Uni<V>get(K key, Function<K,V> valueLoader)<K,V>
io.smallrye.mutiny.Uni<V>getAsync(K key, Class<V> clazz, Function<K,io.smallrye.mutiny.Uni<V>> valueLoader)Allows retrieving a value from the Redis cache.default <K,V>
io.smallrye.mutiny.Uni<V>getAsync(K key, Function<K,io.smallrye.mutiny.Uni<V>> valueLoader)Class<?>getDefaultValueType()When configured, gets the default type of the value stored in the cache.<K,V>
io.smallrye.mutiny.Uni<V>getOrDefault(K key, V defaultValue)<K,V>
io.smallrye.mutiny.Uni<V>getOrNull(K key, Class<V> clazz)<K,V>
io.smallrye.mutiny.Uni<Void>put(K key, Supplier<V> supplier)default <K,V>
io.smallrye.mutiny.Uni<Void>put(K key, V value)Put a value in the cache.-
Methods inherited from interface io.quarkus.cache.Cache
as, getDefaultKey, getName, invalidate, invalidateAll, invalidateIf
-
-
-
-
Method Detail
-
getDefaultValueType
Class<?> getDefaultValueType()
When configured, gets the default type of the value stored in the cache. The configured type is used when no type is passed into theget(Object, Class, Function).- Returns:
- the type,
nullif not configured.
-
get
default <K,V> io.smallrye.mutiny.Uni<V> get(K key, Function<K,V> valueLoader)
-
getAsync
default <K,V> io.smallrye.mutiny.Uni<V> getAsync(K key, Function<K,io.smallrye.mutiny.Uni<V>> valueLoader)
-
get
<K,V> io.smallrye.mutiny.Uni<V> get(K key, Class<V> clazz, Function<K,V> valueLoader)Allows retrieving a value from the Redis cache.- Type Parameters:
K- the type of keyV- the type of value- Parameters:
key- the keyclazz- the class of the valuevalueLoader- the value loader called when there is no value stored in the cache- Returns:
- the Uni emitting the cached value.
-
getAsync
<K,V> io.smallrye.mutiny.Uni<V> getAsync(K key, Class<V> clazz, Function<K,io.smallrye.mutiny.Uni<V>> valueLoader)Allows retrieving a value from the Redis cache.- Type Parameters:
K- the type of keyV- the type of value- Parameters:
key- the keyclazz- the class of the valuevalueLoader- the value loader called when there is no value stored in the cache- Returns:
- the Uni emitting the cached value.
-
put
default <K,V> io.smallrye.mutiny.Uni<Void> put(K key, V value)
Put a value in the cache.- Type Parameters:
K- the type of keyV- the type of value- Parameters:
key- the keyvalue- the value- Returns:
- a Uni emitting
nullwhen the operation completes
-
getOrDefault
<K,V> io.smallrye.mutiny.Uni<V> getOrDefault(K key, V defaultValue)
-
getOrNull
<K,V> io.smallrye.mutiny.Uni<V> getOrNull(K key, Class<V> clazz)
-
-