Builder
public static class Builder
io/agentscope/extensions/redis/state/RedisAgentStateStore.java:525–564RedisAgentStateStore的构建器。位于 io.agentscope.extensions.redis.state 包。核心成员包括 keyPrefix、jedisClient、lettuceClient、lettuceClusterClient、redissonClient、clientAdapter。
Builder for RedisAgentStateStore.
The builder supports multiple Redis client types. Only one client type should be set.
Supported client types:
-
Jedis:
#jedisClient(UnifiedJedis) -
Lettuce Standalone/Sentinel:
#lettuceClient(RedisClient) -
Lettuce Cluster:
#lettuceClusterClient(RedisClusterClient) -
Redisson:
#redissonClient(RedissonClient) -
Custom:
#clientAdapter(RedisClientAdapter)
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder keyPrefix(String keyPrefix) | 设置该配置项。 Performs the key prefix operation. |
public Builder jedisClient(UnifiedJedis unifiedJedis) | 设置该配置项。 Performs the jedis client operation. |
public Builder lettuceClient(RedisClient redisClient) | 设置该配置项。 Performs the lettuce client operation. |
public Builder lettuceClusterClient(RedisClusterClient redisClusterClient) | 设置该配置项。 Performs the lettuce cluster client operation. |
public Builder redissonClient(RedissonClient redissonClient) | 设置该配置项。 Performs the redisson client operation. |
public Builder clientAdapter(RedisClientAdapter clientAdapter) | 设置客户端适配器。 Performs the client adapter operation. |
public RedisAgentStateStore build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
keyPrefix
public Builder keyPrefix(String keyPrefix)
设置该配置项。
Performs the key prefix operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
keyPrefix | String | 键 Prefix(类型 `String`)。The key prefix. |
Builderio/agentscope/extensions/redis/state/RedisAgentStateStore.java:531–534jedisClient
public Builder jedisClient(UnifiedJedis unifiedJedis)
设置该配置项。
Performs the jedis client operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
unifiedJedis | UnifiedJedis | 统一 Jedis(类型 `UnifiedJedis`)。The unified jedis. |
Builderio/agentscope/extensions/redis/state/RedisAgentStateStore.java:536–539lettuceClient
public Builder lettuceClient(RedisClient redisClient)
设置该配置项。
Performs the lettuce client operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
redisClient | RedisClient | Redis 客户端(类型 `RedisClient`)。The redis client. |
Builderio/agentscope/extensions/redis/state/RedisAgentStateStore.java:541–544lettuceClusterClient
public Builder lettuceClusterClient(RedisClusterClient redisClusterClient)
设置该配置项。
Performs the lettuce cluster client operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
redisClusterClient | RedisClusterClient | Redis 集群客户端(类型 `RedisClusterClient`)。The redis cluster client. |
Builderio/agentscope/extensions/redis/state/RedisAgentStateStore.java:546–549redissonClient
public Builder redissonClient(RedissonClient redissonClient)
设置该配置项。
Performs the redisson client operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
redissonClient | RedissonClient | redisson 客户端(类型 `RedissonClient`)。The redisson client. |
Builderio/agentscope/extensions/redis/state/RedisAgentStateStore.java:551–554clientAdapter
public Builder clientAdapter(RedisClientAdapter clientAdapter)
设置客户端适配器。
Performs the client adapter operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
clientAdapter | RedisClientAdapter | 客户端适配器(类型 `RedisClientAdapter`)。The client adapter. |
Builderio/agentscope/extensions/redis/state/RedisAgentStateStore.java:556–559build
public RedisAgentStateStore build()
构建并返回最终实例。
Creates and returns an instance.
RedisAgentStateStoreio/agentscope/extensions/redis/state/RedisAgentStateStore.java:561–563