| Modifier and Type | Class and Description |
|---|---|
| public static interface | MemoizeCache.ValueProvider<
type of the key K, type of the value V>Represents a provider used to create value |
| Modifier and Type | Method and Description |
|---|---|
| public void | cleanUpNullReferences()
Invoked when some of the held SoftReferences have been evicted by the garbage collector and so should be removed from the cache. |
| public V | Returns: the value, or null, if it does not exist.the key whose associated value is to be returned key)Gets a value from the cache |
| public default V | Returns: the cached valueprovide the value if the associated value not found valueProviderTry to get the value from cache. |
| public V | Returns: null, or the old value if the key associated with the specified key.key with which the specified value is to be associated key, V value to be associated with the specified key value)Associates the specified value with the specified key in the cache. |
| cleanUpNullReferences | back to summary |
|---|---|
| public void cleanUpNullReferences() Invoked when some of the held SoftReferences have been evicted by the garbage collector and so should be removed from the cache. The implementation must ensure that concurrent invocations of all methods on the cache may occur from other threads and thus should protect any shared resources. | |
| get | back to summary |
|---|---|
| public V get(K key) Gets a value from the cache
| |
| getAndPut | back to summary |
|---|---|
| public default V getAndPut(K key, MemoizeCache. Try to get the value from cache.
If not found, create the value by
| |
| put | back to summary |
|---|---|
| public V put(K key, V value) Associates the specified value with the specified key in the cache.
| |
| Modifier and Type | Method and Description |
|---|---|
| public V |
| provide | back to summary |
|---|---|
| public V provide(K key) Provide the created value | |