Class TileLRUMember
- java.lang.Object
-
- org.apache.batik.ext.awt.image.rendered.TileLRUMember
-
- All Implemented Interfaces:
LRUCache.LRUObj
- Direct Known Subclasses:
TileMap.TileMapLRUMember
public class TileLRUMember extends java.lang.Object implements 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- Version:
- $Id: TileLRUMember.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanDEBUGprotected java.awt.image.RasterhRasterprotected LRUCache.LRUNodemyNodeprotected java.lang.ref.ReferencewRaster
-
Constructor Summary
Constructors Constructor Description TileLRUMember()TileLRUMember(java.awt.image.Raster ras)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckRaster()LRUCache.LRUNodelruGet()Called to get the LRU node for this object.voidlruRemove()Called to inform the object that it is no longer in the cache.voidlruSet(LRUCache.LRUNode nde)Called when the object first becomes active in the LRU cache.java.awt.image.RasterretrieveRaster()voidsetRaster(java.awt.image.Raster ras)
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
- See Also:
- Constant Field Values
-
myNode
protected LRUCache.LRUNode myNode
-
wRaster
protected java.lang.ref.Reference wRaster
-
hRaster
protected java.awt.image.Raster hRaster
-
-
Method Detail
-
setRaster
public void setRaster(java.awt.image.Raster ras)
-
checkRaster
public boolean checkRaster()
-
retrieveRaster
public java.awt.image.Raster retrieveRaster()
-
lruGet
public LRUCache.LRUNode lruGet()
Description copied from interface:LRUCache.LRUObjCalled to get the LRU node for this object. Should return the node passed in to lruSet.- Specified by:
lruGetin interfaceLRUCache.LRUObj
-
lruSet
public void lruSet(LRUCache.LRUNode nde)
Description copied from interface:LRUCache.LRUObjCalled when the object first becomes active in the LRU cache.- Specified by:
lruSetin 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.LRUObjCalled to inform the object that it is no longer in the cache.- Specified by:
lruRemovein interfaceLRUCache.LRUObj
-
-