com.khubla.pragmatach.framework.cache
Class LRUCache<K,V>
java.lang.Object
com.khubla.pragmatach.framework.cache.LRUCache<K,V>
public class LRUCache<K,V>
- extends Object
A simple LRU cache, based on multiple examples from "The Google".
- Author:
- tome
Constructor Summary |
LRUCache(int cacheSize)
ctor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LRUCache
public LRUCache(int cacheSize)
- ctor
clear
public void clear()
get
public V get(K key)
getAll
public Collection<Map.Entry<K,V>> getAll()
getTotalHits
public long getTotalHits()
getTotalRequests
public long getTotalRequests()
put
public void put(K key,
V value)
size
public int size()
Copyright © 2014 khubla.com. All rights reserved.