Class CachedTileLoaderFactory
- java.lang.Object
-
- org.openstreetmap.josm.data.imagery.CachedTileLoaderFactory
-
- All Implemented Interfaces:
TileLoaderFactory
public class CachedTileLoaderFactory extends java.lang.Object implements TileLoaderFactory
TileLoaderFactory creating JCS cached TileLoaders- Since:
- 8526
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.commons.jcs3.access.behavior.ICacheAccess<java.lang.String,BufferedImageCacheEntry>
cache
static StringProperty
PROP_TILECACHE_DIR
Keeps the cache directory whereprivate java.lang.reflect.Constructor<? extends org.openstreetmap.gui.jmapviewer.interfaces.TileLoader>
tileLoaderConstructor
-
Constructor Summary
Constructors Constructor Description CachedTileLoaderFactory(org.apache.commons.jcs3.access.behavior.ICacheAccess<java.lang.String,BufferedImageCacheEntry> cache, java.lang.Class<? extends org.openstreetmap.gui.jmapviewer.interfaces.TileLoader> tileLoaderClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.openstreetmap.gui.jmapviewer.interfaces.TileLoader
getLoader(org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener listener, org.apache.commons.jcs3.access.behavior.ICacheAccess<java.lang.String,BufferedImageCacheEntry> cache, TileJobOptions options)
private static StringProperty
getTileCacheDir()
org.openstreetmap.gui.jmapviewer.interfaces.TileLoader
makeTileLoader(org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener listener, java.util.Map<java.lang.String,java.lang.String> inputHeaders, long minimumExpiryTime)
Creates TileLoaderFactory - factory that creates tile loaders with all options already set
-
-
-
Field Detail
-
PROP_TILECACHE_DIR
public static final StringProperty PROP_TILECACHE_DIR
Keeps the cache directory where
-
cache
private final org.apache.commons.jcs3.access.behavior.ICacheAccess<java.lang.String,BufferedImageCacheEntry> cache
-
tileLoaderConstructor
private final java.lang.reflect.Constructor<? extends org.openstreetmap.gui.jmapviewer.interfaces.TileLoader> tileLoaderConstructor
-
-
Constructor Detail
-
CachedTileLoaderFactory
public CachedTileLoaderFactory(org.apache.commons.jcs3.access.behavior.ICacheAccess<java.lang.String,BufferedImageCacheEntry> cache, java.lang.Class<? extends org.openstreetmap.gui.jmapviewer.interfaces.TileLoader> tileLoaderClass)
- Parameters:
cache
- cache instance which will be used by tile loaders created by this tile loadertileLoaderClass
- tile loader class that will be created- Throws:
java.lang.IllegalArgumentException
- if a suitable constructor cannot be found fortileLoaderClass
-
-
Method Detail
-
getTileCacheDir
private static StringProperty getTileCacheDir()
-
makeTileLoader
public org.openstreetmap.gui.jmapviewer.interfaces.TileLoader makeTileLoader(org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener listener, java.util.Map<java.lang.String,java.lang.String> inputHeaders, long minimumExpiryTime)
Description copied from interface:TileLoaderFactory
Creates TileLoaderFactory - factory that creates tile loaders with all options already set- Specified by:
makeTileLoader
in interfaceTileLoaderFactory
- Parameters:
listener
- that will be notified, when tile has finished loadinginputHeaders
- that will be sent with requests to TileSource.null
indicates noneminimumExpiryTime
- minimum expiry time- Returns:
- TileLoader that uses both of above
-
getLoader
protected org.openstreetmap.gui.jmapviewer.interfaces.TileLoader getLoader(org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener listener, org.apache.commons.jcs3.access.behavior.ICacheAccess<java.lang.String,BufferedImageCacheEntry> cache, TileJobOptions options)
-
-