public class IlvDefaultDataTileCache extends IlvDataTileCache
IlvDataTileCache
.
IlvDefaultDataTileCache
implements a memory-sensitive cache where
tiles are released whenever the application requires memory to be freed.
As the behavior of the cache partly depends upon the actions of the garbage
collector, you can provide the following parameters to gain a stronger
control over the caching/releasing of tiles:
java.lang.ref.SoftReference
class, this
capacity can be used when the garbage collector is too aggressive at cleaning
up these references.Constructor and Description |
---|
IlvDefaultDataTileCache()
Initializes a new
DataTileCache with
a minimum capacity equal to 0 and a maximum capacity
equal to Integer.MAX_VALUE |
IlvDefaultDataTileCache(int minCapacity,
int maxCapacity)
Initializes a new
DataTileCache with
the specified minimum and maximum capacities. |
Modifier and Type | Method and Description |
---|---|
void |
controllerDisposed(IlvDataTileController controller)
Invoked when a tile controller stops its activity.
|
void |
tileAboutToLoad(IlvDataTile tile)
Invoked by a tile controller each time a tile is about to be loaded.
|
void |
tileCached(IlvDataTile tile)
Adds the specified tile to this cache.
|
void |
tileRetrieved(IlvDataTile tile)
Retrieves the specified tile from this cache.
|
releaseTile
public IlvDefaultDataTileCache()
DataTileCache
with
a minimum capacity equal to 0
and a maximum capacity
equal to Integer.MAX_VALUE
public IlvDefaultDataTileCache(int minCapacity, int maxCapacity)
DataTileCache
with
the specified minimum and maximum capacities.IllegalArgumentException
- If the maximum capacity is not
greater than or equal to the minimum capacity.public void tileAboutToLoad(IlvDataTile tile)
tileAboutToLoad
in class IlvDataTileCache
tile
- The tile that is about to be loaded.public void tileCached(IlvDataTile tile)
tileCached
in class IlvDataTileCache
tile
- The tile that has to be cached.public void tileRetrieved(IlvDataTile tile)
tileRetrieved
in class IlvDataTileCache
tile
- The tile that must be retrieved from
the cache.public void controllerDisposed(IlvDataTileController controller)
controllerDisposed
in class IlvDataTileCache
controller
- The disposed controller.IlvDataTileCache.releaseTile(ilog.views.chart.data.lod.IlvDataTile)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.