public class DefaultTileCacheManager extends 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,
Rectangle2D layerExtent,
double pixelSize,
int tilePxWidth,
int tilePxHeight,
String layerName,
String strategy,
String baseDir,
String fileSuffix,
String epsg,
long size)
Builds a standard cache structure for local files
|
CacheStruct |
createCacheStructure(int typeOfCoords,
int levels,
Rectangle2D layerExtent,
double pixelSize,
int tilePxWidth,
int tilePxHeight,
String uri,
String layerName,
String strategy,
String baseDir,
String fileSuffix,
String epsg,
long size)
Builds a standard cache structure
|
ITileFileSystemStrategy |
createStrategy(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,
Point2D ul,
Point2D lr)
Creates a new tile structure
|
static DefaultTileCacheManager |
getInstance()
Gets an instance of this object for internal use.
|
TileCache |
getTileCache(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(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, Point2D ul, 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, Rectangle2D layerExtent, double pixelSize, int tilePxWidth, int tilePxHeight, String uri, String layerName, String strategy, String baseDir, String fileSuffix, 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, Rectangle2D layerExtent, double pixelSize, int tilePxWidth, int tilePxHeight, String layerName, String strategy, String baseDir, String fileSuffix, 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(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