- Timestamp:
- 2015-11-14T11:43:02+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java
r8783 r9004 54 54 return job; 55 55 } else { 56 // we have acquired the semaphore, but we didn't manage to remove it, as someone else did56 // we have acquired the semaphore, but we didn't manage to remove job, as someone else did 57 57 // release the semaphore and look for another candidate 58 58 releaseSemaphore(job); … … 67 67 } 68 68 } 69 Main.debug("TMS - Queuing job {0} because host limit reached", url);69 Main.debug("TMS - Skipping job {0} because host limit reached", url); 70 70 } 71 71 } -
trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
r8840 r9004 174 174 if (first || force) { 175 175 // submit all jobs to separate thread, so calling thread is not blocked with IO when loading from disk 176 log.log(Level.FINE, "JCS - Submitting job for execution for url: {0}", getUrlNoException()); 176 177 downloadJobExecutor.execute(this); 177 178 } … … 221 222 final String oldName = currentThread.getName(); 222 223 currentThread.setName("JCS Downloading: " + getUrlNoException()); 224 log.log(Level.FINE, "JCS - starting fetch of url: {0} ", getUrlNoException()); 223 225 ensureCacheElement(); 224 226 try { -
trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
r8846 r9004 10 10 import org.openstreetmap.gui.jmapviewer.Tile; 11 11 import org.openstreetmap.gui.jmapviewer.interfaces.CachedTileLoader; 12 import org.openstreetmap.gui.jmapviewer.interfaces.TileCache;13 12 import org.openstreetmap.gui.jmapviewer.interfaces.TileJob; 14 13 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader; … … 26 25 * 27 26 */ 28 public class TMSCachedTileLoader implements TileLoader, CachedTileLoader , TileCache{27 public class TMSCachedTileLoader implements TileLoader, CachedTileLoader { 29 28 30 29 protected final ICacheAccess<String, BufferedImageCacheEntry> cache; … … 108 107 } 109 108 110 @Override111 public Tile getTile(TileSource source, int x, int y, int z) {112 return createTileLoaderJob(new Tile(source, x, y, z)).getTile();113 }114 115 @Override116 public void addTile(Tile tile) {117 createTileLoaderJob(tile).getTile();118 }119 120 @Override121 public int getTileCount() {122 return 0;123 }124 125 @Override126 public void clear() {127 cache.clear();128 }129 130 109 /** 131 110 * @return cache statistics as string -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r8864 r9004 1215 1215 1216 1216 private boolean tooLarge() { 1217 return this.tilesSpanned() > 20;1217 return insane() || this.tilesSpanned() > 20; 1218 1218 } 1219 1219 1220 1220 private boolean insane() { 1221 return this.tilesSpanned() > 100;1221 return size() > tileCache.getCacheSize(); 1222 1222 } 1223 1223
Note:
See TracChangeset
for help on using the changeset viewer.