Package org.lobobrowser.util
Class LRUCache
java.lang.Object
org.lobobrowser.util.LRUCache
- All Implemented Interfaces:
Serializable
A cache with least-recently-used policy.
Note that this class is not thread safe by itself.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRemovalListener
(RemovalListener listener) int
int
int
void
void
removeRemovalListener
(RemovalListener listener) void
setApproxMaxSize
(int approxMaxSize)
-
Constructor Details
-
LRUCache
public LRUCache(int approxMaxSize)
-
-
Method Details
-
getApproxMaxSize
public int getApproxMaxSize() -
setApproxMaxSize
public void setApproxMaxSize(int approxMaxSize) -
put
-
get
-
remove
-
addRemovalListener
-
removeRemovalListener
-
getApproxSize
public int getApproxSize() -
getNumEntries
public int getNumEntries() -
getEntryInfoList
-