ilog.views.tiling
Class IlvTileCache

java.lang.Object
  extended by ilog.views.tiling.IlvTileCache
All Implemented Interfaces:
IlvPersistentObject
Direct Known Subclasses:
IlvDefaultTileCache

public abstract class IlvTileCache
extends Object
implements IlvPersistentObject

This class is used to manage the cached tiles of one or more tile controllers. A cached tile is a tile that is not visible in any view and that is not locked by any application object. An IlvTileCache object releases the cached tiles to free memory when necessary.

Since:
ILOG JViews 3.0
See Also:
IlvTileController

Constructor Summary
protected IlvTileCache()
          Initializes an instance of a tile cache.
 
Method Summary
abstract  void controllerDisposed(IlvTileController controller)
          This method is called when a controller stops its activity.
protected  void releaseTile(IlvTile tile)
          Releases a tile.
abstract  void tileAboutToLoad(IlvTile tile)
          This method is called by a tile controller each time a tile is about to be loaded.
abstract  void tileCached(IlvTile tile)
          This method is called each time a loaded tile no longer has a lock.
abstract  void tileRetrieved(IlvTile tile)
          This method is called each time that an unreleased cached tile is locked again.
 void write(IlvOutputStream stream)
          Writes the cache to an IlvOutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvTileCache

protected IlvTileCache()
Initializes an instance of a tile cache.

Method Detail

releaseTile

protected void releaseTile(IlvTile tile)
Releases a tile.

Parameters:
tile - The tile to release

tileAboutToLoad

public abstract void tileAboutToLoad(IlvTile tile)
This method is called by a tile controller each time a tile is about to be loaded. The cache can then, if necessary, release some cached tiles.

Parameters:
tile - The tile that is about to be loaded

tileCached

public abstract void tileCached(IlvTile tile)
This method is called each time a loaded tile no longer has a lock. It means that the tile is not visible in any view and that no other application object has locked the tile. Cached tiles can be released to release memory for tiles that are about to be loaded.

Parameters:
tile - The tile that has to be cached

tileRetrieved

public abstract void tileRetrieved(IlvTile tile)
This method is called each time that an unreleased cached tile is locked again. It means that the tile is visible in at least one view or has been locked by an application object. Retrieved tiles should not be released.

Parameters:
tile - The tile that is retrieved from the cache by a tile controller

controllerDisposed

public abstract void controllerDisposed(IlvTileController controller)
This method is called when a controller stops its activity. The cache should remove all the tiles that are controlled by the controller from its internal structures without releasing the tiles.


write

public void write(IlvOutputStream stream)
           throws IOException
Writes the cache to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Parameters:
stream - the output stream
Throws:
IOException - thrown when an exception occurs during the write operation for this object.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.