public class GrailsConcurrentLinkedMapCache extends java.lang.Object implements GrailsCache
| Constructor and Description |
|---|
GrailsConcurrentLinkedMapCache(java.lang.String name,
long capacity)
Create a new GrailsConcurrentLinkedMapCache with the specified name
and capacity
|
GrailsConcurrentLinkedMapCache(java.lang.String name,
long capacity,
boolean allowNullValues)
Create a new GrailsConcurrentLinkedMapCache with the specified name
and capacity
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
evict(java.lang.Object key) |
protected java.lang.Object |
fromStoreValue(java.lang.Object storeValue)
Convert the given value from the internal store to a user value
returned from the get method (adapting
null). |
GrailsValueWrapper |
get(java.lang.Object key) |
<T> T |
get(java.lang.Object key,
java.lang.Class<T> type) |
java.util.Collection<java.lang.Object> |
getAllKeys() |
long |
getCapacity() |
java.util.Collection<java.lang.Object> |
getHottestKeys() |
java.lang.String |
getName() |
java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> |
getNativeCache() |
int |
getSize() |
boolean |
isAllowNullValues() |
void |
put(java.lang.Object key,
java.lang.Object value) |
org.springframework.cache.Cache.ValueWrapper |
putIfAbsent(java.lang.Object key,
java.lang.Object value) |
protected java.lang.Object |
toStoreValue(java.lang.Object userValue)
Convert the given user value, as passed into the put method,
to a value in the internal store (adapting
null). |
public GrailsConcurrentLinkedMapCache(java.lang.String name,
long capacity,
boolean allowNullValues)
name - the name of the cachecapaccity - of the mapallow - null values (default is true)public GrailsConcurrentLinkedMapCache(java.lang.String name,
long capacity)
name - the name of the cachecapaccity - of the mappublic final long getCapacity()
public final java.lang.String getName()
getName in interface org.springframework.cache.Cachepublic final java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> getNativeCache()
getNativeCache in interface org.springframework.cache.Cachepublic final int getSize()
public final boolean isAllowNullValues()
public GrailsValueWrapper get(java.lang.Object key)
get in interface org.springframework.cache.Cachepublic <T> T get(java.lang.Object key,
java.lang.Class<T> type)
get in interface org.springframework.cache.Cachepublic java.util.Collection<java.lang.Object> getAllKeys()
getAllKeys in interface GrailsCachepublic java.util.Collection<java.lang.Object> getHottestKeys()
public void put(java.lang.Object key,
java.lang.Object value)
put in interface org.springframework.cache.Cachepublic org.springframework.cache.Cache.ValueWrapper putIfAbsent(java.lang.Object key,
java.lang.Object value)
putIfAbsent in interface org.springframework.cache.Cachepublic void evict(java.lang.Object key)
evict in interface org.springframework.cache.Cachepublic void clear()
clear in interface org.springframework.cache.Cacheprotected java.lang.Object fromStoreValue(java.lang.Object storeValue)
null).storeValue - the store valueprotected java.lang.Object toStoreValue(java.lang.Object userValue)
null).userValue - the given user value