Builder
public static final class Builder
源码Source
io/agentscope/extensions/mysql/sandbox/JdbcSandboxExecutionGuard.java:143–175构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.mysql.sandbox 包。核心成员包括 keyPrefix、lockTimeout、build。
A class in io.agentscope.extensions.mysql.sandbox that persists and restores session and memory data across calls. Declared in io.agentscope.extensions.mysql.sandbox.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder keyPrefix(String keyPrefix) | 设置该配置项。 Performs the key prefix operation. |
public Builder lockTimeout(Duration timeout) | 设置锁超时。 Performs the lock timeout operation. |
public JdbcSandboxExecutionGuard build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
keyPrefix
public Builder keyPrefix(String keyPrefix)
设置该配置项。
Performs the key prefix operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
keyPrefix | String | 键 Prefix(类型 `String`)。The key prefix. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/mysql/sandbox/JdbcSandboxExecutionGuard.java:155–161lockTimeout
public Builder lockTimeout(Duration timeout)
设置锁超时。
Performs the lock timeout operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
timeout | Duration | 超时时间(类型 `Duration`)。The timeout. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/mysql/sandbox/JdbcSandboxExecutionGuard.java:163–170build
public JdbcSandboxExecutionGuard build()
构建并返回最终实例。
Creates and returns an instance.
JdbcSandboxExecutionGuard返回JdbcSandboxExecutionGuard。Returns jdbc sandbox execution guard.
源码Source
io/agentscope/extensions/mysql/sandbox/JdbcSandboxExecutionGuard.java:172–174