- All Implemented Interfaces:
Cache
public class SoftReferenceCache
extends Object
implements Cache
-
-
Constructor Summary
Constructors
-
Method Summary
void
Removes all mappings from a map (optional operation).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Details
-
SoftReferenceCache
public SoftReferenceCache()
-
Method Details
-
put
- Specified by:
put
in interface Cache
- Parameters:
key
- value to be used as key
value
- value to be stored
sizeEstimate
- estimated size
- Returns:
- the old object, that was replaced if present. Otherwise
null
.
-
get
- Specified by:
get
in interface Cache
-
clear
public void clear()
Description copied from interface: Cache
Removes all mappings from a map (optional operation).
- Specified by:
clear
in interface Cache
-
remove
- Specified by:
remove
in interface Cache
- Parameters:
key
- the key of the to be removed object
- Returns:
- the removed object, if present. Otherwise
null
.
-