Class ReferenceCache.Builder<K,V>
java.lang.Object
cloud.opencode.base.cache.ReferenceCache.Builder<K,V>
- Type Parameters:
K- the key type | 键类型V- the value type | 值类型
- Enclosing class:
ReferenceCache<K,V>
Builder for ReferenceCache
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the cache 构建缓存Enable statistics recording 启用统计记录referenceType(ReferenceCache.ReferenceType referenceType) Set reference type 设置引用类型removalListener(RemovalListener<K, V> listener) Set removal listener 设置移除监听器
-
Method Details
-
referenceType
Set reference type 设置引用类型- Parameters:
referenceType- the reference type | 引用类型- Returns:
- this builder | 此构建器
-
removalListener
Set removal listener 设置移除监听器- Parameters:
listener- the listener | 监听器- Returns:
- this builder | 此构建器
-
recordStats
Enable statistics recording 启用统计记录- Returns:
- this builder | 此构建器
-
build
-