Last change
on this file since 8424 was 8424, checked in by wiktorn, 9 years ago |
Set URLConnection.setUseCaches(false) when forcing reload of tiles. Closes #11379
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.cache;
|
---|
3 |
|
---|
4 | import java.net.URL;
|
---|
5 |
|
---|
6 |
|
---|
7 | /**
|
---|
8 | *
|
---|
9 | * @author Wiktor Niesiobędzki
|
---|
10 | *
|
---|
11 | * @param <K> cache key type
|
---|
12 | */
|
---|
13 | public interface ICachedLoaderJob<K> {
|
---|
14 | /**
|
---|
15 | * returns cache entry key
|
---|
16 | *
|
---|
17 | * @param tile
|
---|
18 | * @return cache key for tile
|
---|
19 | */
|
---|
20 | public K getCacheKey();
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * method to get download URL for Job
|
---|
24 | * @return URL that should be fetched
|
---|
25 | *
|
---|
26 | */
|
---|
27 | public URL getUrl();
|
---|
28 | /**
|
---|
29 | * implements the main algorithm for fetching
|
---|
30 | */
|
---|
31 | public void run();
|
---|
32 |
|
---|
33 | /**
|
---|
34 | * fetches object from cache, or returns null when object is not found
|
---|
35 | *
|
---|
36 | * @return filled tile with data or null when no cache entry found
|
---|
37 | */
|
---|
38 | public CacheEntry get();
|
---|
39 |
|
---|
40 | /**
|
---|
41 | * Submit job for background fetch, and listener will be
|
---|
42 | * fed with value object
|
---|
43 | *
|
---|
44 | * @param listener
|
---|
45 | * @param force true if the load should skip all the caches (local & remote)
|
---|
46 | */
|
---|
47 | public void submit(ICachedLoaderListener listener, boolean force);
|
---|
48 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.