Changeset 36306 in osm for applications
- Timestamp:
- 2024-08-12T18:54:07+02:00 (5 months ago)
- Location:
- applications/viewer/jmapviewer
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer
-
Property ReleaseVersion
changed from
2.20
to2.21
-
Property ReleaseVersion
changed from
-
applications/viewer/jmapviewer/pom.xml
r36293 r36306 6 6 <groupId>org.openstreetmap.jmapviewer</groupId> 7 7 <artifactId>jmapviewer</artifactId> 8 <version>2.2 0</version>8 <version>2.22-SNAPSHOT</version> 9 9 10 10 <name>JMapViewer</name> -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MemoryTileCache.java
r36223 r36306 2 2 package org.openstreetmap.gui.jmapviewer; 3 3 4 import java.util.Collection; 4 5 import java.util.HashMap; 5 6 import java.util.Map; 6 7 import java.util.logging.Level; 7 8 import java.util.logging.Logger; 9 import java.util.stream.Collectors; 8 10 9 11 import org.openstreetmap.gui.jmapviewer.interfaces.TileCache; … … 102 104 hash.clear(); 103 105 lruTiles.clear(); 106 } 107 108 @Override 109 public synchronized void clearErrorTiles() { 110 Collection<CacheEntry> toRemove = hash.values().stream().filter(cacheEntry -> cacheEntry.tile.hasError()).collect(Collectors.toList()); 111 hash.values().removeAll(toRemove); 112 toRemove.forEach(lruTiles::removeEntry); 104 113 } 105 114 -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java
r31739 r36306 50 50 51 51 /** 52 * Removes error tiles from memory. 53 * This is implementation specific; the default calls {@link #clear()}. 54 */ 55 default void clearErrorTiles() { 56 this.clear(); 57 } 58 59 /** 52 60 * Size of the cache. 53 61 * @return maximum number of tiles in cache
Note:
See TracChangeset
for help on using the changeset viewer.