Interface Cache
-
- All Known Implementing Classes:
SoftReferenceCache
public interface Cache
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Removes all mappings from a map (optional operation).java.lang.Object
get(java.lang.Object key)
java.lang.Object
put(java.lang.Object key, java.lang.Object value, int sizeEstimate)
java.lang.Object
remove(java.lang.Object key)
-
-
-
Method Detail
-
put
java.lang.Object put(java.lang.Object key, java.lang.Object value, int sizeEstimate)
- Parameters:
key
- value to be used as keyvalue
- value to be storedsizeEstimate
- estimated size- Returns:
- the old object, that was replaced if present. Otherwise
null
.
-
get
java.lang.Object get(java.lang.Object key)
-
clear
void clear()
Removes all mappings from a map (optional operation).- Throws:
java.lang.UnsupportedOperationException
- ifclear()
is not supported by the map.
-
remove
java.lang.Object remove(java.lang.Object key)
- Parameters:
key
- the key of the to be removed object- Returns:
- the removed object, if present. Otherwise
null
.
-
-