Constructor and Description |
---|
StandardCache(String name,
boolean useSoftReferences,
int initialCapacity,
ICacheEntryValidityChecker<? super K,? super V> entryValidityChecker,
org.slf4j.Logger logger) |
StandardCache(String name,
boolean useSoftReferences,
int initialCapacity,
int maxSize,
ICacheEntryValidityChecker<? super K,? super V> entryValidityChecker,
org.slf4j.Logger logger) |
StandardCache(String name,
boolean useSoftReferences,
int initialCapacity,
int maxSize,
org.slf4j.Logger logger) |
StandardCache(String name,
boolean useSoftReferences,
int initialCapacity,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the entire cache.
|
void |
clearKey(K key)
Clears a specific entry in the cache.
|
V |
get(K key)
Retrieve a value from the cache.
|
V |
get(K key,
ICacheEntryValidityChecker<? super K,? super V> validityChecker)
Retrieve a value from the cache, using the specified validity checker
to ensure the entry is still valid.
|
int |
getMaxSize() |
String |
getName() |
boolean |
getUseSoftReferences() |
boolean |
hasMaxSize() |
Set<K> |
keySet()
Returns all the keys contained in this cache.
|
void |
put(K key,
V value)
Insert a new value into the cache.
|
int |
size() |
public StandardCache(String name, boolean useSoftReferences, int initialCapacity, org.slf4j.Logger logger)
public StandardCache(String name, boolean useSoftReferences, int initialCapacity, ICacheEntryValidityChecker<? super K,? super V> entryValidityChecker, org.slf4j.Logger logger)
public StandardCache(String name, boolean useSoftReferences, int initialCapacity, int maxSize, org.slf4j.Logger logger)
public StandardCache(String name, boolean useSoftReferences, int initialCapacity, int maxSize, ICacheEntryValidityChecker<? super K,? super V> entryValidityChecker, org.slf4j.Logger logger)
public void put(K key, V value)
ICache
Insert a new value into the cache.
public V get(K key, ICacheEntryValidityChecker<? super K,? super V> validityChecker)
ICache
Retrieve a value from the cache, using the specified validity checker to ensure the entry is still valid. If the cache already has a default validity checker, this method should override this setting and use the one specified instead.
public Set<K> keySet()
Returns all the keys contained in this cache. Note this method might return keys for entries
that are already invalid, so the result of calling get(Object)
for these keys might
be null.
public void clear()
ICache
Clear the entire cache.
public void clearKey(K key)
ICache
Clears a specific entry in the cache.
public String getName()
public boolean hasMaxSize()
public int getMaxSize()
public boolean getUseSoftReferences()
public int size()
Copyright © 2016 The THYMELEAF team. All rights reserved.