Package io.sentry.spring7.cache
Class SentryCacheWrapper
java.lang.Object
io.sentry.spring7.cache.SentryCacheWrapper
- All Implemented Interfaces:
Cache
Wraps a Spring
Cache to create Sentry spans for cache operations.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.cache.Cache
Cache.ValueRetrievalException, Cache.ValueWrapper -
Constructor Summary
ConstructorsConstructorDescriptionSentryCacheWrapper(@NotNull Cache delegate, @NotNull io.sentry.IScopes scopes) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidbooleanevictIfPresent(@NotNull Object key) @Nullable Cache.ValueWrapper<T> T<T> T@NotNull StringgetName()@NotNull Objectbooleanvoid@Nullable Cache.ValueWrapperputIfAbsent(@NotNull Object key, @Nullable Object value) @Nullable CompletableFuture<?><T> CompletableFuture<T>retrieve(@NotNull Object key, @NotNull Supplier<CompletableFuture<T>> valueLoader)
-
Constructor Details
-
SentryCacheWrapper
public SentryCacheWrapper(@NotNull @NotNull Cache delegate, @NotNull @NotNull io.sentry.IScopes scopes)
-
-
Method Details
-
getName
-
getNativeCache
- Specified by:
getNativeCachein interfaceCache
-
get
-
get
-
get
-
retrieve
-
retrieve
public <T> CompletableFuture<T> retrieve(@NotNull @NotNull Object key, @NotNull @NotNull Supplier<CompletableFuture<T>> valueLoader) -
put
-
putIfAbsent
@Nullable public @Nullable Cache.ValueWrapper putIfAbsent(@NotNull @NotNull Object key, @Nullable @Nullable Object value) - Specified by:
putIfAbsentin interfaceCache
-
evict
-
evictIfPresent
- Specified by:
evictIfPresentin interfaceCache
-
clear
public void clear() -
invalidate
public boolean invalidate()- Specified by:
invalidatein interfaceCache
-