- java.lang.Object
-
- com.gluonhq.attach.cache.impl.DefaultCache<K,V>
-
-
Constructor Summary
Constructors Constructor Description DefaultCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
get(K key)
Get the value for the specified key, or null when there is no such key.void
put(K key, V value)
Stores a key-value pair in the cache.boolean
remove(K key)
Remove the entry associated with this key.void
removeAll()
Remove all entries from the cache
-
-
-
Method Detail
-
get
public V get(K key)
Description copied from interface:Cache
Get the value for the specified key, or null when there is no such key. The latter can be because there never was an entry with this key stored, or the entry with this key has been reclaimed.
-
put
public void put(K key, V value)
Description copied from interface:Cache
Stores a key-value pair in the cache. ANullPointerException
will be thrown if the key or the value arenull
.
-
remove
public boolean remove(K key)
Description copied from interface:Cache
Remove the entry associated with this key.
-
-