Changeset 8459 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2015-06-03T13:24:59+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
r8433 r8459 114 114 /** 115 115 * @param cache cache instance that we will work on 116 * @param headers 117 * @param readTimeout 118 * @param connectTimeout 119 * @param downloadJobExecutor 116 * @param headers HTTP headers to be sent together with request 117 * @param readTimeout when connecting to remote resource 118 * @param connectTimeout when connecting to remote resource 119 * @param downloadJobExecutor that will be executing the jobs 120 120 */ 121 121 public JCSCachedTileLoaderJob(ICacheAccess<K,V> cache, … … 134 134 /** 135 135 * @param cache cache instance that we will work on 136 * @param headers 137 * @param readTimeout 138 * @param connectTimeout 136 * @param headers HTTP headers to be sent together with request 137 * @param readTimeout when connecting to remote resource 138 * @param connectTimeout when connecting to remote resource 139 139 */ 140 140 public JCSCachedTileLoaderJob(ICacheAccess<K, V> cache, -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r8456 r8459 1023 1023 1024 1024 /** 1025 * Sets the Map of <header name, header value> that if any of this header1025 * Sets the map of <header name, header value> that if any of this header 1026 1026 * will be returned, then this tile will be treated as "no tile at this zoom level" 1027 1027 * 1028 * @param noTileHeaders 1028 * @param noTileHeaders Map of <header name, header value> which will be treated as "no tile at this zoom level" 1029 1029 * @since 8344 1030 1030 */ … … 1039 1039 1040 1040 /** 1041 * Returns the map <header name, metadata key> indicating, which HTTP headers should1041 * Returns the map of <header name, metadata key> indicating, which HTTP headers should 1042 1042 * be moved to metadata 1043 1043 * 1044 * @param metadataHeaders 1044 * @param metadataHeaders map of <header name, metadata key> indicating, which HTTP headers should be moved to metadata 1045 1045 * @since 8418 1046 1046 */ -
trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
r8403 r8459 29 29 public class TMSCachedTileLoader implements TileLoader, CachedTileLoader, TileCache { 30 30 31 private ICacheAccess<String, BufferedImageCacheEntry> cache;32 private int connectTimeout;33 private int readTimeout;34 private Map<String, String> headers;35 private TileLoaderListener listener;31 private final ICacheAccess<String, BufferedImageCacheEntry> cache; 32 private final int connectTimeout; 33 private final int readTimeout; 34 private final Map<String, String> headers; 35 private final TileLoaderListener listener; 36 36 private static final String PREFERENCE_PREFIX = "imagery.tms.cache."; 37 37 38 /** 38 * how many object on disk should be stored for TMS region. Average tile size is about 20kb 39 * how many object on disk should be stored for TMS region. Average tile size is about 20kb. 25000 is around 500MB under this assumption 39 40 */ 40 public static final IntegerProperty MAX_OBJECTS_ON_DISK = new IntegerProperty(PREFERENCE_PREFIX + "max_objects_disk", 25000); // 25000 is around 500MB under this assumptions41 public static final IntegerProperty MAX_OBJECTS_ON_DISK = new IntegerProperty(PREFERENCE_PREFIX + "max_objects_disk", 25000); 41 42 42 43 /** … … 50 51 public static final IntegerProperty HOST_LIMIT = new IntegerProperty("imagery.tms.tmsloader.maxjobsperhost", 6); 51 52 52 53 53 /** 54 54 * separate from JCS thread pool for TMS loader, so we can have different thread pools for default JCS … … 56 56 */ 57 57 private static ThreadPoolExecutor DEFAULT_DOWNLOAD_JOB_DISPATCHER = getThreadPoolExecutor(); 58 59 private final ThreadPoolExecutor downloadExecutor = DEFAULT_DOWNLOAD_JOB_DISPATCHER; 58 60 59 61 private static ThreadPoolExecutor getThreadPoolExecutor() { … … 68 70 } 69 71 70 private ThreadPoolExecutor downloadExecutor = DEFAULT_DOWNLOAD_JOB_DISPATCHER;71 72 72 /** 73 73 * Constructor … … 76 76 * @param connectTimeout to remote resource 77 77 * @param readTimeout to remote resource 78 * @param headers to be sent along with request78 * @param headers HTTP headers to be sent along with request 79 79 * @param cacheDir where cache file shall reside 80 80 * @throws IOException when cache initialization fails -
trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
r8433 r8459 52 52 /** 53 53 * Constructor for creating a job, to get a specific tile from cache 54 * @param listener 54 * @param listener Tile loader listener 55 55 * @param tile to be fetched from cache 56 56 * @param cache object 57 57 * @param connectTimeout when connecting to remote resource 58 58 * @param readTimeout when connecting to remote resource 59 * @param headers to be sent together with request59 * @param headers HTTP headers to be sent together with request 60 60 * @param downloadExecutor that will be executing the jobs 61 61 */
Note:
See TracChangeset
for help on using the changeset viewer.