Code example for ConcurrentMap

Methods: containsKey

0
     *            the cache key 
     * @return true if the value is cached in memory or on disk, false otherwise 
     */ 
    @Override 
    public synchronized boolean containsKey(Object key) {
        return cache.containsKey(key) || containsKeyOnDisk(key);
    } 
 
    /** 
     * Checks if a value is present in the in-memory cache. This method ignores the disk cache. 
     *  
     * @param key 
     *            the cache key 
     * @return true if the value is currently hold in memory, false otherwise 
     */ 
    public synchronized boolean containsKeyInMemory(Object key) {
        return cache.containsKey(key);
    } 
 
    /** 
     * Checks if a value is present in the disk cache. This method ignores the memory cache.