Class AccessPatternAnalyzer.Builder<K>
java.lang.Object
cloud.opencode.base.cache.analysis.AccessPatternAnalyzer.Builder<K>
- Type Parameters:
K- key type | 键类型
- Enclosing class:
AccessPatternAnalyzer<K>
Builder for AccessPatternAnalyzer
AccessPatternAnalyzer 构建器
- Since:
- JDK 25, opencode-base-cache V2.0.5
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the analyzer 构建分析器coldDataAge(Duration age) Set cold data age threshold 设置冷数据年龄阈值hotKeyThreshold(long threshold) Set hot key threshold 设置热点键阈值topKSize(int size) Set top K size 设置 Top K 大小windowDuration(Duration duration) Set analysis window duration 设置分析窗口持续时间
-
Constructor Details
-
Builder
public Builder()Creates a new Builder instance | 创建新的构建器实例
-
-
Method Details
-
hotKeyThreshold
Set hot key threshold 设置热点键阈值- Parameters:
threshold- access count to be considered hot | 被视为热点的访问计数- Returns:
- this builder | 此构建器
-
coldDataAge
Set cold data age threshold 设置冷数据年龄阈值- Parameters:
age- age after which data is considered cold | 数据被视为冷的年龄- Returns:
- this builder | 此构建器
-
topKSize
Set top K size 设置 Top K 大小- Parameters:
size- number of top keys to track | 要跟踪的顶部键数量- Returns:
- this builder | 此构建器
-
windowDuration
Set analysis window duration 设置分析窗口持续时间- Parameters:
duration- window duration | 窗口持续时间- Returns:
- this builder | 此构建器
-
build
-