Class MultiLevelCache.LevelConfigBuilder<K,V>
java.lang.Object
cloud.opencode.base.cache.multilevel.MultiLevelCache.LevelConfigBuilder<K,V>
- Type Parameters:
K- the key type | 键类型V- the value type | 值类型
- Enclosing class:
MultiLevelCache<K,V>
Level configuration builder
级别配置构建器
- Since:
- JDK 25, opencode-base-cache V2.0.5
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LevelConfigBuilder instance | 创建新的 LevelConfigBuilder 实例 -
Method Summary
Modifier and TypeMethodDescriptionbuild()build | buildSets the cache for this level | 设置此级别的缓存name | namepromoteOnHit(boolean promote) promoteOnHit | promoteOnHitttl | ttlwriteEnabled(boolean enabled) writeEnabled | writeEnabled
-
Constructor Details
-
LevelConfigBuilder
public LevelConfigBuilder()Creates a new LevelConfigBuilder instance | 创建新的 LevelConfigBuilder 实例
-
-
Method Details
-
name
name | name- Parameters:
name- the name | name- Returns:
- the result | 结果
-
cache
-
ttl
ttl | ttl- Parameters:
ttl- the ttl | ttl- Returns:
- the result | 结果
-
promoteOnHit
promoteOnHit | promoteOnHit- Parameters:
promote- the promote | promote- Returns:
- the result | 结果
-
writeEnabled
writeEnabled | writeEnabled- Parameters:
enabled- the enabled | enabled- Returns:
- the result | 结果
-
build
-