Code example for ConcurrentHashMap

Methods: isEmpty

0
    /** 
     * Resumes loading photos from the database. 
     */ 
    public void resume() { 
        mPaused = false;
        if (!mPendingRequests.isEmpty()) {
            requestLoading(); 
        } 
    } 
 
    /** 
     * Sends a message to this thread itself to start loading images.  If the current 
     * view contains multiple image views, all of those image views will get a chance 
     * to request their respective photos before any of those requests are executed. 
     * This allows us to load images in bulk. 
     */ 
    private void requestLoading() { 
        if (!mLoadingRequested) {
            mLoadingRequested = true;
            mMainThreadHandler.sendEmptyMessage(MESSAGE_REQUEST_LOADING);
        }