Class LoomSpringCache
java.lang.Object
com.loomcache.springboot.cache.LoomSpringCache
- All Implemented Interfaces:
org.springframework.cache.Cache
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.cache.Cache
org.springframework.cache.Cache.ValueRetrievalException, org.springframework.cache.Cache.ValueWrapper -
Constructor Summary
ConstructorsConstructorDescriptionLoomSpringCache(String name, LoomCache loomClient) Construct a new Spring Cache backed by a LoomCache distributed map.LoomSpringCache(String name, LoomCache loomClient, Duration defaultTtl) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()void@Nullable org.springframework.cache.Cache.ValueWrapper<T> @Nullable T<T> @Nullable TgetName()void@Nullable org.springframework.cache.Cache.ValueWrapperputIfAbsent(Object key, @Nullable Object value) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.cache.Cache
evictIfPresent, invalidate, retrieve, retrieve
-
Constructor Details
-
LoomSpringCache
Construct a new Spring Cache backed by a LoomCache distributed map.- Parameters:
name- the cache name (used as the distributed map name)loomClient- the LoomCache client instance- Throws:
IllegalArgumentException- if name is null or blankNullPointerException- if loomClient is null
-
LoomSpringCache
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.springframework.cache.Cache
-
getNativeCache
- Specified by:
getNativeCachein interfaceorg.springframework.cache.Cache
-
get
- Specified by:
getin interfaceorg.springframework.cache.Cache
-
get
-
get
-
put
-
putIfAbsent
-
evict
- Specified by:
evictin interfaceorg.springframework.cache.Cache
-
clear
public void clear()- Specified by:
clearin interfaceorg.springframework.cache.Cache
-