it.geosolutions.concurrent
Class CachedTileImpl

java.lang.Object
  extended by it.geosolutions.concurrent.CachedTileImpl
All Implemented Interfaces:
javax.media.jai.CachedTile

public final class CachedTileImpl
extends Object
implements javax.media.jai.CachedTile

This class is used by ConcurrentTileCache to create an object that includes all the information associated with a tile, and is put into the cache.


Constructor Summary
CachedTileImpl(RenderedImage owner, int tileX, int tileY, Raster tile, Object tileCacheMetric)
          Constructor that takes a tile cache metric
 
Method Summary
 int getAction()
          Returns information about the status of the tile
 Object getImageKey()
          Returns the key associate to the tile owner
 Object getKey()
          Returns the key associated to the tile.
 RenderedImage getOwner()
          Returns the owner of the cached tile.
 Raster getTile()
          Returns the value of the cached tile.
 Object getTileCacheMetric()
          Returns the tileCacheMetric object
 long getTileSize()
          Returns the tile memory size
 long getTileTimeStamp()
          Returns the current time stamp
static Object hashKey(RenderedImage owner)
          Returns the hash table "key" as a Object for this image.
static Object hashKey(RenderedImage owner, int tileX, int tileY)
          Returns the hash table "key" as a Object for this tile.
 void setAction(ConcurrentTileCache.Actions newAction)
          Sets the status of the tile
 void updateTileTimeStamp()
          Sets the timestamp to the new current value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedTileImpl

public CachedTileImpl(RenderedImage owner,
                      int tileX,
                      int tileY,
                      Raster tile,
                      Object tileCacheMetric)
Constructor that takes a tile cache metric

Since:
1.1
Method Detail

getKey

public Object getKey()
Returns the key associated to the tile.

Returns:

getImageKey

public Object getImageKey()
Returns the key associate to the tile owner

Returns:

hashKey

public static Object hashKey(RenderedImage owner,
                             int tileX,
                             int tileY)
Returns the hash table "key" as a Object for this tile.


hashKey

public static Object hashKey(RenderedImage owner)
Returns the hash table "key" as a Object for this image.


getTile

public Raster getTile()
Returns the value of the cached tile.

Specified by:
getTile in interface javax.media.jai.CachedTile

getOwner

public RenderedImage getOwner()
Returns the owner of the cached tile.

Specified by:
getOwner in interface javax.media.jai.CachedTile

getTileTimeStamp

public long getTileTimeStamp()
Returns the current time stamp

Specified by:
getTileTimeStamp in interface javax.media.jai.CachedTile

getTileCacheMetric

public Object getTileCacheMetric()
Returns the tileCacheMetric object

Specified by:
getTileCacheMetric in interface javax.media.jai.CachedTile

getTileSize

public long getTileSize()
Returns the tile memory size

Specified by:
getTileSize in interface javax.media.jai.CachedTile

getAction

public int getAction()
Returns information about the status of the tile

Specified by:
getAction in interface javax.media.jai.CachedTile

setAction

public void setAction(ConcurrentTileCache.Actions newAction)
Sets the status of the tile


updateTileTimeStamp

public void updateTileTimeStamp()
Sets the timestamp to the new current value



Copyright © 2006–2014 GeoSolutions. All rights reserved.