Changeset 9709 in josm


Ignore:
Timestamp:
2016-02-01T21:31:02+01:00 (8 years ago)
Author:
simon04
Message:

Refactoring (final fields)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r9232 r9709  
    6969     */
    7070
    71     private static ThreadPoolExecutor DEFAULT_DOWNLOAD_JOB_DISPATCHER = new ThreadPoolExecutor(
     71    private static final ThreadPoolExecutor DEFAULT_DOWNLOAD_JOB_DISPATCHER = new ThreadPoolExecutor(
    7272            2, // we have a small queue, so threads will be quickly started (threads are started only, when queue is full)
    73             THREAD_LIMIT.get().intValue(), // do not this number of threads
     73            THREAD_LIMIT.get(), // do not this number of threads
    7474            30, // keepalive for thread
    7575            TimeUnit.SECONDS,
     
    8181
    8282
    83     private static ConcurrentMap<String, Set<ICachedLoaderListener>> inProgress = new ConcurrentHashMap<>();
    84     private static ConcurrentMap<String, Boolean> useHead = new ConcurrentHashMap<>();
    85 
    86     protected long now; // when the job started
    87 
    88     private ICacheAccess<K, V> cache;
     83    private static final ConcurrentMap<String, Set<ICachedLoaderListener>> inProgress = new ConcurrentHashMap<>();
     84    private static final ConcurrentMap<String, Boolean> useHead = new ConcurrentHashMap<>();
     85
     86    protected final long now; // when the job started
     87
     88    private final ICacheAccess<K, V> cache;
    8989    private ICacheElement<K, V> cacheElement;
    9090    protected V cacheData;
     
    9292
    9393    // HTTP connection parameters
    94     private int connectTimeout;
    95     private int readTimeout;
    96     private Map<String, String> headers;
    97     private ThreadPoolExecutor downloadJobExecutor;
     94    private final int connectTimeout;
     95    private final int readTimeout;
     96    private final Map<String, String> headers;
     97    private final ThreadPoolExecutor downloadJobExecutor;
    9898    private Runnable finishTask;
    9999    private boolean force;
Note: See TracChangeset for help on using the changeset viewer.