| Package | Description |
|---|---|
| org.atlanmod.commons.cache |
Provides classes for caching.
|
| Modifier and Type | Method and Description |
|---|---|
static CacheBuilder<Object,Object> |
CacheBuilder.builder()
Creates a new
CacheBuilder with default settings, including strong keys, strong values, and no automatic
eviction of any kind. |
CacheBuilder<K,V> |
CacheBuilder.initialCapacity(int initialCapacity)
Sets the minimum total size for the internal data structures.
|
CacheBuilder<K,V> |
CacheBuilder.maximumSize(long maximumSize)
Specifies the maximum number of entries the cache may contain.
|
<K1 extends K,V1 extends V> |
CacheBuilder.maximumWeight(long maximumWeight,
ToIntBiFunction<? super K1,? extends V1> weigher)
Specifies the maximum weight of entries the cache may contain.
|
CacheBuilder<K,V> |
CacheBuilder.recordStats()
Enables the accumulation of
CacheStats during the operation of the cache. |
CacheBuilder<K,V> |
CacheBuilder.softValues()
Specifies that each value (not key) stored in the cache should be wrapped in a
SoftReference (by default,
strong references are used). |
CacheBuilder<K,V> |
CacheBuilder.weakKeys()
Specifies that each key (not value) stored in the cache should be wrapped in a
WeakReference (by default,
strong references are used). |
CacheBuilder<K,V> |
CacheBuilder.weakValues()
Specifies that each value (not key) stored in the cache should be wrapped in a
WeakReference (by default,
strong references are used). |
Copyright © 2017–2019 Atlanmod. All rights reserved.