Code example for LinkedHashMap

Methods: containsKey

0
     * Returns whether the cache contains the given key, without performing any IO. 
     * @param key 
     * @return 
     */ 
    public boolean containsKey(String key) {
        return lruEntries.containsKey(key);
    } 
 
    /** 
     * To differentiate between old and current snapshots, each entry is given 
     * a sequence number each time an edit is committed. A snapshot is stale if 
     * its sequence number is not equal to its entry's sequence number. 
     */ 
    private long nextSequenceNumber = 0;
 
    /** This cache uses a single background thread to evict entries. */ 
    final ThreadPoolExecutor executorService =
    new ThreadPoolExecutor(0, 1, 60L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
    private final Callable<Void> cleanupCallable = new Callable<Void>() {
        public Void call() throws Exception { 
            synchronized (DiskLruCache.this) {