Changeset 10378 in josm for trunk/src/org/openstreetmap/josm/data/cache
- Timestamp:
- 2016-06-15T10:30:37+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/cache
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java
r9070 r10378 92 92 String val = attrs.get(key); 93 93 if (val == null) { 94 attrs.put(key, 94 attrs.put(key, "0"); 95 95 return 0; 96 96 } -
trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java
r9004 r10378 100 100 } 101 101 102 private 102 private Semaphore getSemaphore(JCSCachedTileLoaderJob<?, ?> job) { 103 103 String host; 104 104 try { -
trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
r10323 r10378 42 42 43 43 private static volatile CompositeCacheManager cacheManager; 44 private static long maxObjectTTL 44 private static long maxObjectTTL = -1; 45 45 private static final String PREFERENCE_PREFIX = "jcs.cache"; 46 46 private static BooleanProperty USE_BLOCK_CACHE = new BooleanProperty(PREFERENCE_PREFIX + ".use_block_cache", true); … … 53 53 * default objects to be held in memory by JCS caches (per region) 54 54 */ 55 public static final IntegerProperty DEFAULT_MAX_OBJECTS_IN_MEMORY 55 public static final IntegerProperty DEFAULT_MAX_OBJECTS_IN_MEMORY = new IntegerProperty(PREFERENCE_PREFIX + ".max_objects_in_memory", 1000); 56 56 57 57 private JCSCacheManager() { … … 114 114 // these are default common to all cache regions 115 115 // use of auxiliary cache and sizing of the caches is done with giving proper geCache(...) params 116 // CHECKSTYLE.OFF: SingleSpaceSeparator 116 117 props.setProperty("jcs.default.cacheattributes", CompositeCacheAttributes.class.getCanonicalName()); 117 118 props.setProperty("jcs.default.cacheattributes.MaxObjects", DEFAULT_MAX_OBJECTS_IN_MEMORY.get().toString()); … … 123 124 props.setProperty("jcs.default.elementattributes.IdleTime", Long.toString(maxObjectTTL)); 124 125 props.setProperty("jcs.default.elementattributes.IsSpool", "true"); 126 // CHECKSTYLE.ON: SingleSpaceSeparator 125 127 CompositeCacheManager cm = CompositeCacheManager.getUnconfiguredInstance(); 126 128 cm.configure(props); -
trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
r10308 r10378 313 313 final HttpClient request = getRequest("GET", true); 314 314 315 if (isObjectLoadable() 315 if (isObjectLoadable() && 316 316 (now - attributes.getLastModification()) <= ABSOLUTE_EXPIRE_TIME_LIMIT) { 317 317 request.setIfModifiedSince(attributes.getLastModification()); … … 397 397 } catch (InterruptedException e) { 398 398 attributes.setErrorMessage(e.toString()); 399 log.log(Level.WARNING, "JCS - Exception during download {0}", 399 log.log(Level.WARNING, "JCS - Exception during download {0}", getUrlNoException()); 400 400 Main.warn(e); 401 401 }
Note:
See TracChangeset
for help on using the changeset viewer.