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;
    } 
 
    /** 
     *  
     * @param rootDir 
     *            a folder name to enable caching or null to disable it. 
     */ 
    public void setDiskCacheEnabled(String rootDir) {
        if (rootDir != null && rootDir.length() > 0) {
            setRootDir(rootDir);
            this.isDiskCacheEnabled = true;