Builder
public static final class Builder
源码Source
io/agentscope/extensions/jdbc/sandbox/JdbcSandboxExecutionGuard.java:79–114JdbcSandboxExecutionGuard的构建器。位于 io.agentscope.extensions.jdbc.sandbox 包。核心成员包括 keyPrefix、lockTimeout、build。
Builder for JdbcSandboxExecutionGuard.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder keyPrefix(String keyPrefix) | 设置该配置项。 Sets a custom key prefix for the lock name. |
public Builder lockTimeout(Duration timeout) | 设置锁超时时长。 Sets the lock timeout duration. |
public JdbcSandboxExecutionGuard build() | 构建`JdbcSandboxExecutionGuard`。 Builds the `JdbcSandboxExecutionGuard`. |
方法详情Method Detail
keyPrefix
public Builder keyPrefix(String keyPrefix)
设置该配置项。
Sets a custom key prefix for the lock name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
keyPrefix | String | 键 Prefix(类型 `String`)。The key prefix. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/jdbc/sandbox/JdbcSandboxExecutionGuard.java:92–98lockTimeout
public Builder lockTimeout(Duration timeout)
设置锁超时时长。
Sets the lock timeout duration.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
timeout | Duration | 超时时间(类型 `Duration`)。The timeout. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/jdbc/sandbox/JdbcSandboxExecutionGuard.java:101–108build
public JdbcSandboxExecutionGuard build()
构建JdbcSandboxExecutionGuard。
Builds the JdbcSandboxExecutionGuard.
JdbcSandboxExecutionGuard返回JdbcSandboxExecutionGuard。Returns jdbc sandbox execution guard.
源码Source
io/agentscope/extensions/jdbc/sandbox/JdbcSandboxExecutionGuard.java:111–113