Class SoftMapCache
java.lang.Object
org.apache.xmlgraphics.image.loader.util.SoftMapCache
Provides a simple cache using soft references and storing the values in a Map. The keys into
the Map are hard references, the values are referenced through soft references. The collected
values are cleaned up through a ReferenceQueue.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the cache.voidTriggers some house-keeping, i.e.Returns the value associated with the given key.voidPut a new value in the cache overwriting any existing value with the same key.Removed the value associated with the given key.
-
Constructor Details
-
SoftMapCache
public SoftMapCache(boolean synched) Creates a new soft cache.- Parameters:
synched- true if the Map containing the values should by synchronized
-
-
Method Details
-
get
-
remove
-
put
-
clear
public void clear()Clears the cache. -
doHouseKeeping
public void doHouseKeeping()Triggers some house-keeping, i.e. processes any pending objects in the reference queue.
-