@ThreadSafe public final class BoundedCache<K,V> extends Object
When the cache is full, batch eviction of random 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.
| Modifier and Type | Class and Description | 
|---|---|
| static class  | BoundedCache.Builder<K,V> | 
| Modifier and Type | Method and Description | 
|---|---|
| static <K,V> BoundedCache.Builder | builder() | 
| V | get(K key)Get a value based on the key. | 
public V get(K key)
BoundedCache.Builder.mappingFunction(Function).public static <K,V> BoundedCache.Builder builder()
Copyright © 2025. All rights reserved.