Code example for ConcurrentMap

Methods: isEmpty

0
    public synchronized int size() { 
        return cache.size();
    } 
 
    public synchronized boolean isEmpty() { 
        return cache.isEmpty();
    } 
 
    public boolean isDiskCacheEnabled() { 
        return isDiskCacheEnabled;
    } 
 
    /** 
     * Retrieves the list of files that are currently cached to disk. Guarantees to never return 
     * null. 
     *  
     * @return the list of files on disk 
     */ 
    public List<File> getCachedFiles() {
        File[] cachedFiles = new File(diskCacheDirectory).listFiles();
        if (cachedFiles == null) {