public class NoOpSyncCache
extends java.lang.Object
implements io.micronaut.cache.SyncCache<java.lang.Object>
SyncCache implementation suitable for disabling caching.| Constructor and Description |
|---|
NoOpSyncCache(java.lang.String name)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.Optional<T> |
get(java.lang.Object key,
io.micronaut.core.type.Argument<T> requiredType) |
<T> T |
get(java.lang.Object key,
io.micronaut.core.type.Argument<T> requiredType,
java.util.function.Supplier<T> supplier) |
java.lang.String |
getName() |
java.lang.Object |
getNativeCache() |
void |
invalidate(java.lang.Object key) |
void |
invalidateAll() |
void |
put(java.lang.Object key,
java.lang.Object value) |
<T> java.util.Optional<T> |
putIfAbsent(java.lang.Object key,
T value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic NoOpSyncCache(java.lang.String name)
name - the cache name@Nonnull
public <T> java.util.Optional<T> get(@Nonnull
java.lang.Object key,
@Nonnull
io.micronaut.core.type.Argument<T> requiredType)
get in interface io.micronaut.cache.SyncCache<java.lang.Object>public <T> T get(@Nonnull
java.lang.Object key,
@Nonnull
io.micronaut.core.type.Argument<T> requiredType,
@Nonnull
java.util.function.Supplier<T> supplier)
get in interface io.micronaut.cache.SyncCache<java.lang.Object>@Nonnull
public <T> java.util.Optional<T> putIfAbsent(@Nonnull
java.lang.Object key,
@Nonnull
T value)
putIfAbsent in interface io.micronaut.cache.SyncCache<java.lang.Object>public void put(@Nonnull
java.lang.Object key,
@Nonnull
java.lang.Object value)
put in interface io.micronaut.cache.SyncCache<java.lang.Object>public void invalidate(@Nonnull
java.lang.Object key)
invalidate in interface io.micronaut.cache.SyncCache<java.lang.Object>public void invalidateAll()
invalidateAll in interface io.micronaut.cache.SyncCache<java.lang.Object>public java.lang.String getName()
getName in interface io.micronaut.cache.Cache<java.lang.Object>public java.lang.Object getNativeCache()
getNativeCache in interface io.micronaut.cache.Cache<java.lang.Object>