javax.media.jai
Interface TileRecycler
- All Known Implementing Classes:
- RecyclingTileFactory
- public interface TileRecycler
An interface to a mechanism which is capable of recycling tiles.
In general the term recycle in this context is taken to
mean re-using memory allocated to the tile. This would usually
be accomplished by reclaiming the data bank (array) associated
with the DataBuffer
of the tile Raster
.
It would also be possible by simple translation of a
WritableRaster
provided the SampleModel
was compatible with the tile required by its eventual user.
Tile recycling should be used with caution. In particular,
the calling code must be certain that any tile submitted for
recycling not be used elsewhere. If one or more references to
tiles submitted to a recycler are held by the calling code then
undefined and unexpected behavior may be observed. A similar
caution applies to the tile's DataBuffer
and the
data bank array contained therein.
- Since:
- JAI 1.1.2
Method Summary |
void |
recycleTile(Raster tile)
Suggests to the TileRecycler that the parameter
tile is no longer needed and may be used in creating a new
Raster . |
recycleTile
public void recycleTile(Raster tile)
- Suggests to the
TileRecycler
that the parameter
tile is no longer needed and may be used in creating a new
Raster
. This will inevitably result in at least
the internal array being overwritten. If a reference to
the tile, its DataBuffer
, or the data bank(s) of its
DataBuffer
is held elsewhere in the caller's code,
undefined behavior may result. It is the responsibilty of
the calling code to ensure that this does not occur.
- Parameters:
tile
- A tile which mey be re-used either directly or
by reclaiming its internal DataBuffer
or primitive data array.- Throws:
IllegalArgumentException
- if tile
is
null
.