Class StreetsideCache
- java.lang.Object
-
- org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob<java.lang.String,BufferedImageCacheEntry>
-
- org.openstreetmap.josm.plugins.streetside.cache.StreetsideCache
-
- All Implemented Interfaces:
java.lang.Runnable,ICachedLoaderJob<java.lang.String>
public class StreetsideCache extends JCSCachedTileLoaderJob<java.lang.String,BufferedImageCacheEntry>
Stores the downloaded pictures locally.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStreetsideCache.TypeTypes of images.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringidprivate java.net.URLurl-
Fields inherited from class org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob
ABSOLUTE_EXPIRE_TIME_LIMIT, attributes, cacheData, DEFAULT_EXPIRE_TIME, EXPIRE_TIME_SERVER_LIMIT, now, THREAD_LIMIT
-
-
Constructor Summary
Constructors Constructor Description StreetsideCache(java.lang.String id, StreetsideCache.Type type)Main constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BufferedImageCacheEntrycreateCacheEntry(byte[] content)java.lang.StringgetCacheKey()java.net.URLgetUrl()protected booleanisObjectLoadable()-
Methods inherited from class org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob
cacheAsEmpty, cancelOutstandingTasks, detectErrorMessage, executionFinished, get, getServerKey, handleJobCancellation, isCacheElementValid, isResponseLoadable, parseHeaders, run, setFinishedTask, submit
-
-
-
-
Constructor Detail
-
StreetsideCache
public StreetsideCache(java.lang.String id, StreetsideCache.Type type)
Main constructor.- Parameters:
id- The id of the image.type- The type of image that must be downloaded (THUMBNAIL or FULL_IMAGE).
-
-
Method Detail
-
getCacheKey
public java.lang.String getCacheKey()
-
getUrl
public java.net.URL getUrl()
-
createCacheEntry
protected BufferedImageCacheEntry createCacheEntry(byte[] content)
- Specified by:
createCacheEntryin classJCSCachedTileLoaderJob<java.lang.String,BufferedImageCacheEntry>
-
isObjectLoadable
protected boolean isObjectLoadable()
- Overrides:
isObjectLoadablein classJCSCachedTileLoaderJob<java.lang.String,BufferedImageCacheEntry>
-
-