java.lang.Object
com.gluonhq.attach.cache.impl.DefaultCache<K,V>
- Type Parameters:
K
- type for the keyV
- type for the value
- All Implemented Interfaces:
Cache<K,
V>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the value for the specified key, or null when there is no such key.void
Stores a key-value pair in the cache.boolean
Remove the entry associated with this key.void
Remove all entries from the cache
-
Constructor Details
-
DefaultCache
public DefaultCache()
-
-
Method Details
-
get
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
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
Description copied from interface:Cache
Remove the entry associated with this key. -
removeAll
public void removeAll()Description copied from interface:Cache
Remove all entries from the cache
-