Code example for ThreadPoolExecutor

Methods: setMaximumPoolSize

0
    /** 
     * @param numThreads 
     *            the maximum number of threads that will be started to download images in parallel 
     */ 
    public void setThreadPoolSize(int numThreads) {
        executor.setMaximumPoolSize(numThreads);
    } 
 
    /** 
     * @param numAttempts 
     *            how often the remoteimageview loader should retry the remoteimageview download if network connection 
     *            fails 
     */ 
    public void setMaxDownloadAttempts(int numAttempts) {
        numRetries = numAttempts;
    } 
 
    /** 
     * If the server you're loading images from does not report file sizes via the Content-Length 
     * header, then you can use this method to tell the downloader how much space it should allocate 
     * by default when downloading an remoteimageview into memory.