Interface Cache<KeyType,ValueType>
-
- Type Parameters:
KeyType- type of key being storedValueType- java of value being stored
- All Known Implementing Classes:
DefaultCache
public interface Cache<KeyType,ValueType>Cache which stores a singleDozerCacheTypetype
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Removes all of the mappings from this map.booleancontainsKey(KeyType key)Returns true if this map contains a mapping for the specified key.ValueTypeget(KeyType key)Returns the value to which the specified key is mapped, ornullif this map contains no mapping for the key.intgetMaxSize()Returns the maximum number of entries which the cache can holdStringgetName()Returns the name of the overall cache storelonggetSize()Returns the number of key-value mappings in this map.voidput(KeyType key, ValueType value)Associates the specified value with the specified key in this map.
-
-
-
Method Detail
-
clear
void clear()
Removes all of the mappings from this map. The map will be empty after this call returns.
-
put
void put(KeyType key, ValueType value)
Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key
-
get
ValueType get(KeyType key)
Returns the value to which the specified key is mapped, ornullif this map contains no mapping for the key.- Parameters:
key- key with which the specified value is to be associated- Returns:
- value to be associated with the specified key
-
getName
String getName()
Returns the name of the overall cache store- Returns:
- name of the overall cache store
-
getSize
long getSize()
Returns the number of key-value mappings in this map.- Returns:
- the number of key-value mappings in this map
-
getMaxSize
int getMaxSize()
Returns the maximum number of entries which the cache can hold- Returns:
- maximum number of entries which the cache can hold
-
containsKey
boolean containsKey(KeyType key)
Returns true if this map contains a mapping for the specified key.- Parameters:
key- The key whose presence in this map is to be tested- Returns:
- true if this map contains a mapping for the specified key.
-
-