Class BoundedCache<K,V>
java.lang.Object
software.amazon.awssdk.utils.cache.bounded.BoundedCache<K,V>
A thread-safe cache implementation that returns the value for a specified key, retrieving it by either getting the stored
value from the cache or using a supplied function to calculate that value and add it to the cache.
When the cache is full, batch eviction of unspecified values will be performed, with a default evictionBatchSize of 10.
The user can configure the maximum size of the cache, which is set to a default of 150.
Keys must not be null, otherwise an error will be thrown. Null values are not cached.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> BoundedCache.Builder <K, V> boolean
containsKey
(K key) Get a value based on the key.int
size()
-
Method Details
-
get
-
size
public int size() -
containsKey
-
builder
-