Class OpenCodeCacheManager.Builder
java.lang.Object
cloud.opencode.base.cache.spring.OpenCodeCacheManager.Builder
- Enclosing class:
OpenCodeCacheManager
Builder for OpenCodeCacheManager
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowNullValues(boolean allowNullValues) Set whether to allow null values 设置是否允许 null 值build()Build the cache manager 构建缓存管理器Configure a named cache 配置命名缓存defaultConfig(Consumer<CacheConfig.Builder<Object, Object>> configurer) Set default cache configuration 设置默认缓存配置
-
Constructor Details
-
Builder
public Builder()Creates a new Builder instance | 创建新的 Builder 实例
-
-
Method Details
-
defaultConfig
public OpenCodeCacheManager.Builder defaultConfig(Consumer<CacheConfig.Builder<Object, Object>> configurer) Set default cache configuration 设置默认缓存配置- Parameters:
configurer- configuration consumer | 配置消费者- Returns:
- this builder | 此构建器
-
cache
public OpenCodeCacheManager.Builder cache(String name, Consumer<CacheConfig.Builder<Object, Object>> configurer) Configure a named cache 配置命名缓存- Parameters:
name- cache name | 缓存名称configurer- configuration consumer | 配置消费者- Returns:
- this builder | 此构建器
-
allowNullValues
Set whether to allow null values 设置是否允许 null 值- Parameters:
allowNullValues- true to allow null | 允许 null 为 true- Returns:
- this builder | 此构建器
-
build
-