org.bridj.util
Class ConcurrentCache<K,V>
java.lang.Object
org.bridj.util.ConcurrentCache<K,V>
public class ConcurrentCache<K,V>
- extends Object
Cache that creates its missing values automatically, using the value class' default constructor (override newInstance(Object)
to call another constructor)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
protected final ConcurrentHashMap<K,V> map
valueClass
protected final Class<V> valueClass
ConcurrentCache
public ConcurrentCache(Class<V> valueClass)
newInstance
protected V newInstance(K key)
get
public V get(K key)
clear
public void clear()
entrySet
public Iterable<Map.Entry<K,V>> entrySet()
Copyright © 2009-2012. All Rights Reserved.