com.alibaba.dubbo.common.utils
Class LRUCache<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
com.alibaba.dubbo.common.utils.LRUCache<K,V>
- All Implemented Interfaces:
- Serializable, Cloneable, Map<K,V>
public class LRUCache<K,V>
- extends LinkedHashMap<K,V>
- See Also:
- Serialized Form
LRUCache
public LRUCache()
LRUCache
public LRUCache(int maxCapacity)
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map<K,V>
- Overrides:
containsKey
in class HashMap<K,V>
get
public V get(Object key)
- Specified by:
get
in interface Map<K,V>
- Overrides:
get
in class LinkedHashMap<K,V>
put
public V put(K key,
V value)
- Specified by:
put
in interface Map<K,V>
- Overrides:
put
in class HashMap<K,V>
remove
public V remove(Object key)
- Specified by:
remove
in interface Map<K,V>
- Overrides:
remove
in class HashMap<K,V>
size
public int size()
- Specified by:
size
in interface Map<K,V>
- Overrides:
size
in class HashMap<K,V>
clear
public void clear()
- Specified by:
clear
in interface Map<K,V>
- Overrides:
clear
in class LinkedHashMap<K,V>
getMaxCapacity
public int getMaxCapacity()
setMaxCapacity
public void setMaxCapacity(int maxCapacity)
Copyright © 2012–2017 Alibaba. All rights reserved.