|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.thymeleaf.cache.StandardCache<K,V>
K
- The type of the cache keysV
- The type of the cache valuespublic final class StandardCache<K,V>
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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()
|
void |
put(K key,
V value)
Insert a new value into the cache. |
int |
size()
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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)
Method Detail |
---|
public void put(K key, V value)
ICache
Insert a new value into the cache.
put
in interface ICache<K,V>
key
- the key of the new entryvalue
- the value to be cachedpublic V get(K key)
ICache
Retrieve a value from the cache.
get
in interface ICache<K,V>
key
- the key of the value to be retrieved
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.
get
in interface ICache<K,V>
key
- the key of the value to be retrievedvalidityChecker
- the validity checker to be used to ensure the entry is still valid.
public void clear()
ICache
Clear the entire cache.
clear
in interface ICache<K,V>
public void clearKey(K key)
ICache
Clears a specific entry in the cache.
clearKey
in interface ICache<K,V>
key
- the key of the entry to be cleared.public String getName()
public boolean hasMaxSize()
public int getMaxSize()
public boolean getUseSoftReferences()
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |