Code example for ConcurrentMap

Methods: size

0
    @SuppressWarnings("unchecked") 
    public synchronized ValT remove(Object key) {
        ValT value = removeKey(key);
 
        if (isDiskCacheEnabled) {
            File cachedValue = getFileForKey((KeyT) key);
            if (cachedValue.exists()) {
                cachedValue.delete();
            } 
        } 
 
        return value;
    } 
     
    // Forced key expiration 
    public ValT removeKey(Object key) {
        return cache.remove(key);
    } 
 
    public Set<KeyT> keySet() {
        return cache.keySet();