Class TileLRUMember
java.lang.Object
org.apache.batik.ext.awt.image.rendered.TileLRUMember
- All Implemented Interfaces:
LRUCache.LRUObj
This is a useful class that wraps a Raster for patricipation in
an LRU Cache. When this object drops out of the LRU cache it
removes it's hard reference to the tile, but retains it's soft
reference allowing for the recovery of the tile when the JVM is
not under memory pressure
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
lruGet()
Called to get the LRU node for this object.void
Called to inform the object that it is no longer in the cache.void
lruSet
(LRUCache.LRUNode nde) Called when the object first becomes active in the LRU cache.void
-
Field Details
-
myNode
-
wRaster
-
hRaster
-
-
Constructor Details
-
TileLRUMember
public TileLRUMember() -
TileLRUMember
-
-
Method Details
-
setRaster
-
checkRaster
public boolean checkRaster() -
retrieveRaster
-
lruGet
Description copied from interface:LRUCache.LRUObj
Called to get the LRU node for this object. Should return the node passed in to lruSet.- Specified by:
lruGet
in interfaceLRUCache.LRUObj
-
lruSet
Description copied from interface:LRUCache.LRUObj
Called when the object first becomes active in the LRU cache.- Specified by:
lruSet
in interfaceLRUCache.LRUObj
- Parameters:
nde
- The LRU cache node associated with this object. should be remembered so it can be returned bylruGet
.
-
lruRemove
public void lruRemove()Description copied from interface:LRUCache.LRUObj
Called to inform the object that it is no longer in the cache.- Specified by:
lruRemove
in interfaceLRUCache.LRUObj
-