Class CacheEventDispatcher.Builder<K,V>
java.lang.Object
cloud.opencode.base.cache.event.CacheEventDispatcher.Builder<K,V>
- Type Parameters:
K- key type | 键类型V- value type | 值类型
- Enclosing class:
CacheEventDispatcher<K,V>
Builder for CacheEventDispatcher
CacheEventDispatcher 构建器
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasyncExecutor(ExecutorService executor) Set async executor 设置异步执行器build()Build the dispatcher 构建分发器errorHandler(CacheEventDispatcher.EventErrorHandler<K, V> errorHandler) Set error handler 设置错误处理器
-
Constructor Details
-
Builder
public Builder()Creates a new Builder instance | 创建新的构建器实例
-
-
Method Details
-
asyncExecutor
Set async executor 设置异步执行器- Parameters:
executor- the executor | 执行器- Returns:
- this builder | 此构建器
-
errorHandler
public CacheEventDispatcher.Builder<K,V> errorHandler(CacheEventDispatcher.EventErrorHandler<K, V> errorHandler) Set error handler 设置错误处理器- Parameters:
errorHandler- the error handler | 错误处理器- Returns:
- this builder | 此构建器
-
build
-