Package waffle.util.cache
Class CaffeineCache<K,V>
- java.lang.Object
-
- waffle.util.cache.CaffeineCache<K,V>
-
-
Constructor Summary
Constructors Constructor Description CaffeineCache(@org.checkerframework.checker.index.qual.NonNegative long timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vget(K key)Fetches the key from the cachevoidput(K key, V value)Stores a binding for the key and the value in the cachevoidremove(K key)Removes the binding for the key from the cacheintsize()Returns the number of bindings in this cache
-
-
-
Method Detail
-
get
public V get(K key)
Description copied from interface:CacheFetches the key from the cache- Specified by:
getin interfaceCache<K,V>- Parameters:
key- the key- Returns:
- the corresponding value
- See Also:
Map.get(java.lang.Object)
-
put
public void put(K key, V value)
Description copied from interface:CacheStores a binding for the key and the value in the cache- Specified by:
putin interfaceCache<K,V>- Parameters:
key- the keyvalue- the value- See Also:
Map.put(K, V)
-
remove
public void remove(K key)
Description copied from interface:CacheRemoves the binding for the key from the cache- Specified by:
removein interfaceCache<K,V>- Parameters:
key- the key- See Also:
Map.remove(Object)
-
-