public class DefaultTileCacheManager extends java.lang.Object implements TileCacheManager
RasterManager
implementation.Modifier and Type | Field and Description |
---|---|
static int |
TILE_TIME_OUT |
Constructor and Description |
---|
DefaultTileCacheManager() |
Modifier and Type | Method and Description |
---|---|
CacheStruct |
createCacheStructure(int typeOfCoords,
int levels,
java.awt.geom.Rectangle2D layerExtent,
double pixelSize,
int tilePxWidth,
int tilePxHeight,
java.lang.String layerName,
java.lang.String strategy,
java.lang.String baseDir,
java.lang.String fileSuffix,
java.lang.String epsg,
long size)
Builds a standard cache structure for local files
|
CacheStruct |
createCacheStructure(int typeOfCoords,
int levels,
java.awt.geom.Rectangle2D layerExtent,
double pixelSize,
int tilePxWidth,
int tilePxHeight,
java.lang.String uri,
java.lang.String layerName,
java.lang.String strategy,
java.lang.String baseDir,
java.lang.String fileSuffix,
java.lang.String epsg,
long size)
Builds a standard cache structure
|
ITileFileSystemStrategy |
createStrategy(java.lang.String strategy)
Creates a strategy object
|
ThreadPool |
createThreadPool(boolean priorityActive)
Builds a new thread pool.
|
ThreadPool |
createThreadPool(boolean priorityActive,
int nThreads)
Builds a new thread pool selecting the number of threads
|
Tile |
createTile(int level,
int col,
int row)
Creates a new tile structure
|
Tile |
createTile(int wPx,
int hPx,
int row,
int col,
java.awt.geom.Point2D ul,
java.awt.geom.Point2D lr)
Creates a new tile structure
|
static DefaultTileCacheManager |
getInstance()
Gets an instance of this object for internal use.
|
TileCache |
getTileCache(java.lang.String baseDir)
Builds a new entry point for a tile cache.
|
int |
getTileTimeOut()
Gets the time out in milliseconds
|
void |
setTileTimeOut(int ms)
Sets the time out in milliseconds
|
public static DefaultTileCacheManager getInstance()
public TileCache getTileCache(java.lang.String baseDir)
TileCacheManager
getTileCache
in interface TileCacheManager
public Tile createTile(int level, int col, int row)
TileCacheManager
createTile
in interface TileCacheManager
col
- Tile columnrow
- Tile rowpublic Tile createTile(int wPx, int hPx, int row, int col, java.awt.geom.Point2D ul, java.awt.geom.Point2D lr)
TileCacheManager
createTile
in interface TileCacheManager
wPx
- Width in pixelshPx
- Height in pixelsrow
- Tile rowcol
- Tile columnul
- Upper left coordinatelr
- Lower roght coordinatepublic CacheStruct createCacheStructure(int typeOfCoords, int levels, java.awt.geom.Rectangle2D layerExtent, double pixelSize, int tilePxWidth, int tilePxHeight, java.lang.String uri, java.lang.String layerName, java.lang.String strategy, java.lang.String baseDir, java.lang.String fileSuffix, java.lang.String epsg, long size)
TileCacheManager
createCacheStructure
in interface TileCacheManager
typeOfCoords
- Constant defined in CacheStruct interfacelevels
- Number of levelslayerExtent
- Bounding box of the layerpixelSize
- Pixel size of the layertilePxWidth
- Width in pixels of a tiletilePxHeight
- Height in pixels of a tileuri
- server URLlayerName
- Layer name or identifierstrategy
- Strategy to store tiles in diskbaseDir
- path to this layerfileSuffix
- File suffixpublic CacheStruct createCacheStructure(int typeOfCoords, int levels, java.awt.geom.Rectangle2D layerExtent, double pixelSize, int tilePxWidth, int tilePxHeight, java.lang.String layerName, java.lang.String strategy, java.lang.String baseDir, java.lang.String fileSuffix, java.lang.String epsg, long size)
TileCacheManager
createCacheStructure
in interface TileCacheManager
typeOfCoords
- Constant defined in CacheStruct interfacelevels
- Number of levelslayerExtent
- Bounding box of the layerpixelSize
- Pixel size of the layertilePxWidth
- Width in pixels of a tiletilePxHeight
- Height in pixels of a tilelayerName
- Layer name or identifierstrategy
- Strategy to store tiles in diskbaseDir
- path to this layerfileSuffix
- File suffixpublic ITileFileSystemStrategy createStrategy(java.lang.String strategy)
strategy
- public ThreadPool createThreadPool(boolean priorityActive)
TileCacheManager
createThreadPool
in interface TileCacheManager
public ThreadPool createThreadPool(boolean priorityActive, int nThreads)
TileCacheManager
createThreadPool
in interface TileCacheManager
public void setTileTimeOut(int ms)
TileCacheManager
setTileTimeOut
in interface TileCacheManager
public int getTileTimeOut()
TileCacheManager
getTileTimeOut
in interface TileCacheManager