Code example for LinkedHashMap

Methods: size

0
     * and eliminate at least 2000 ops. 
     */ 
    private boolean journalRebuildRequired() { 
        final int REDUNDANT_OP_COMPACT_THRESHOLD = 2000;
        return redundantOpCount >= REDUNDANT_OP_COMPACT_THRESHOLD
                && redundantOpCount >= lruEntries.size();
    } 
 
    /** 
     * Drops the entry for {@code key} if it exists and can be removed. Entries 
     * actively being edited cannot be removed. 
     * 
     * @return true if an entry was removed. 
     */ 
    synchronized boolean remove(String key) throws IOException {
        checkNotClosed(); 
        validateKey(key);
        Entry entry = lruEntries.get(key);
        if (entry == null || entry.currentEditor != null) {
            return false; 
        }