Class TimeoutCache.Builder<K,V>
java.lang.Object
cloud.opencode.base.cache.TimeoutCache.Builder<K,V>
- Type Parameters:
K- the key type | 键类型V- the value type | 值类型
- Enclosing class:
TimeoutCache<K,V>
Builder for TimeoutCache
- Since:
- JDK 25, opencode-base-cache V1.9.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the timeout cache 构建超时缓存defaultTimeout(Duration timeout) Set default timeout for operations 设置操作的默认超时executor(ExecutorService executor) Set custom executor for async operations 设置异步操作的自定义执行器
-
Method Details
-
defaultTimeout
Set default timeout for operations 设置操作的默认超时- Parameters:
timeout- default timeout | 默认超时- Returns:
- this builder | 此构建器
-
executor
Set custom executor for async operations 设置异步操作的自定义执行器- Parameters:
executor- the executor | 执行器- Returns:
- this builder | 此构建器
-
build
-