Builder
public static class Builder
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:111–166SandboxConfig的构建器。位于 io.agentscope.runtime.sandbox.manager.model.container 包。核心成员包括 imageName、sandboxType、resourceLimits、securityLevel、timeout、description。
Builder for SandboxConfig
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder imageName(String imageName) | 设置图像名称。 Performs the image name operation. |
public Builder sandboxType(SandboxType sandboxType) | 设置沙箱类型。 Performs the sandbox type operation. |
public Builder resourceLimits(Map<String, Object> resourceLimits) | 设置该配置项。 Performs the resource limits operation. |
public Builder securityLevel(String securityLevel) | 设置该配置项。 Performs the security level operation. |
public Builder timeout(int timeout) | 设置超时。 Performs the timeout operation. |
public Builder description(String description) | 设置该配置项。 Performs the description operation. |
public Builder environment(Map<String, String> environment) | 设置环境。 Performs the environment operation. |
public Builder runtimeConfig(Map<String, Object> runtimeConfig) | 设置运行时配置。 Performs the runtime config operation. |
public SandboxConfig build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
imageName
public Builder imageName(String imageName)
设置图像名称。
Performs the image name operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
imageName | String | 图像名称(类型 `String`)。The image name. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:121–124sandboxType
public Builder sandboxType(SandboxType sandboxType)
设置沙箱类型。
Performs the sandbox type operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxType | SandboxType | 沙箱类型(类型 `SandboxType`)。The sandbox type. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:126–129resourceLimits
public Builder resourceLimits(Map<String, Object> resourceLimits)
设置该配置项。
Performs the resource limits operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
resourceLimits | Map<String, Object> | 资源 Limits(类型 `Map`)。The resource limits. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:131–134securityLevel
public Builder securityLevel(String securityLevel)
设置该配置项。
Performs the security level operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
securityLevel | String | security 级别(类型 `String`)。The security level. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:136–139timeout
public Builder timeout(int timeout)
设置超时。
Performs the timeout operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
timeout | int | 超时时间(类型 `int`)。The timeout. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:141–144description
public Builder description(String description)
设置该配置项。
Performs the description operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
description | String | 描述(类型 `String`)。The description. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:146–149environment
public Builder environment(Map<String, String> environment)
设置环境。
Performs the environment operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environment | Map<String, String> | 环境(类型 `Map`)。The environment. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:151–154runtimeConfig
public Builder runtimeConfig(Map<String, Object> runtimeConfig)
设置运行时配置。
Performs the runtime config operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runtimeConfig | Map<String, Object> | 运行时配置(类型 `Map`)。The runtime config. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:156–159build
public SandboxConfig build()
构建并返回最终实例。
Creates and returns an instance.
SandboxConfig返回SandboxConfig。Returns sandbox config.
源码Source
io/agentscope/runtime/sandbox/manager/model/container/SandboxConfig.java:161–165