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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the value for the specified key, or null when there is no such key.voidStores a key-value pair in the cache.booleanRemove the entry associated with this key.voidRemove all entries from the cache
-
Constructor Details
-
DefaultCache
public DefaultCache()
-
-
Method Details
-
get
Description copied from interface:CacheGet 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:CacheStores a key-value pair in the cache. ANullPointerExceptionwill be thrown if the key or the value arenull. -
remove
Description copied from interface:CacheRemove the entry associated with this key. -
removeAll
public void removeAll()Description copied from interface:CacheRemove all entries from the cache
-