org.apache.batik.ext.awt.image.rendered
Class TileLRUMember

java.lang.Object
  extended by org.apache.batik.ext.awt.image.rendered.TileLRUMember
All Implemented Interfaces:
LRUCache.LRUObj

public class TileLRUMember
extends 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


Field Summary
protected  Raster hRaster
           
protected  LRUCache.LRUNode myNode
           
protected  Reference wRaster
           
 
Constructor Summary
TileLRUMember()
           
TileLRUMember(Raster ras)
           
 
Method Summary
 boolean checkRaster()
           
 LRUCache.LRUNode lruGet()
          Called to get the LRU node for this object.
 void lruRemove()
          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.
 Raster retrieveRaster()
           
 void setRaster(Raster ras)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myNode

protected LRUCache.LRUNode myNode

wRaster

protected Reference wRaster

hRaster

protected Raster hRaster
Constructor Detail

TileLRUMember

public TileLRUMember()

TileLRUMember

public TileLRUMember(Raster ras)
Method Detail

setRaster

public void setRaster(Raster ras)

checkRaster

public boolean checkRaster()

retrieveRaster

public Raster retrieveRaster()

lruGet

public LRUCache.LRUNode 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 interface LRUCache.LRUObj

lruSet

public void lruSet(LRUCache.LRUNode nde)
Description copied from interface: LRUCache.LRUObj
Called when the object first becomes active in the LRU cache.

Specified by:
lruSet in interface LRUCache.LRUObj
Parameters:
nde - The LRU cache node associated with this object. should be remembered so it can be returned by lruGet.

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 interface LRUCache.LRUObj


Copyright © 2008 Apache Software Foundation. All Rights Reserved.