public class IlvDefaultTileCache extends IlvTileCache
Constructor and Description |
---|
IlvDefaultTileCache()
Creates an instance of the default cache.
|
IlvDefaultTileCache(IlvInputStream stream)
Reads a cache from an
IlvInputStream . |
IlvDefaultTileCache(int size)
Creates an instance of the default cache with the specified size.
|
Modifier and Type | Method and Description |
---|---|
void |
controllerDisposed(IlvTileController controller)
Removes the tiles of the specified controller from the internal
structure of the cache.
|
int |
getCacheSize()
Returns the cache size.
|
static IlvDefaultTileCache |
GetDefaultCache()
Returns a default cache instance that can be shared by several tile
controllers.
|
void |
setCacheSize(int size)
Sets the cache size.
|
void |
tileAboutToLoad(IlvTile tile)
This method is called by a tile controller each time that
a tile is about to be loaded.
|
void |
tileCached(IlvTile tile)
This method is called each time a loaded tile no longer has a lock.
|
void |
tileRetrieved(IlvTile tile)
This method is called each time that a cached tile is locked again.
|
void |
write(IlvOutputStream stream)
Writes the cache to an
IlvOutputStream . |
releaseTile
public IlvDefaultTileCache()
public IlvDefaultTileCache(int size)
size
- The default cache sizepublic IlvDefaultTileCache(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input streamIlvReadFileException
- if an error occurs while reading.public static IlvDefaultTileCache GetDefaultCache()
public void tileCached(IlvTile tile)
tileCached
in class IlvTileCache
tile
- The tile to be cachedpublic void tileRetrieved(IlvTile tile)
tileRetrieved
in class IlvTileCache
tile
- The tile that is retrieved from the cache by a tile controllerpublic void tileAboutToLoad(IlvTile tile)
tileAboutToLoad
in class IlvTileCache
tile
- The tile that is about to be loadedpublic void controllerDisposed(IlvTileController controller)
controllerDisposed
in class IlvTileCache
public final int getCacheSize()
public void setCacheSize(int size)
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvTileCache
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.