Builder
public static final class Builder
源码Source
io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:103–161CreateSandboxOptions的构建器。位于 io.agentscope.extensions.sandbox.kubernetes.client 包。核心成员包括 namespace、claimName、sandboxReadyTimeoutSeconds、shutdownAfterSeconds、labels、podLabels。
Builder for CreateSandboxOptions.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder namespace(String namespace) | 设置命名空间。 Performs the namespace operation. |
public Builder claimName(String claimName) | 设置该配置项。 Sets an explicit SandboxClaim name (used by the harness adapter to encode session id). |
public Builder sandboxReadyTimeoutSeconds(long sandboxReadyTimeoutSeconds) | 设置沙箱就绪超时秒。 Performs the sandbox ready timeout seconds operation. |
public Builder shutdownAfterSeconds(Long shutdownAfterSeconds) | 设置该配置项。 Performs the shutdown after seconds operation. |
public Builder labels(Map<String, String> labels) | 设置该配置项。 Performs the labels operation. |
public Builder podLabels(Map<String, String> podLabels) | 设置该配置项。 Performs the pod labels operation. |
public Builder podAnnotations(Map<String, String> podAnnotations) | 设置该配置项。 Performs the pod annotations operation. |
public CreateSandboxOptions build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
namespace
public Builder namespace(String namespace)
设置命名空间。
Performs the namespace operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
namespace | String | 命名空间(类型 `String`)。The namespace. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:117–120claimName
public Builder claimName(String claimName)
设置该配置项。
Sets an explicit SandboxClaim name (used by the harness adapter to encode session id).
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
claimName | String | claim 名称(类型 `String`)。claim resource name |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:128–131sandboxReadyTimeoutSeconds
public Builder sandboxReadyTimeoutSeconds(long sandboxReadyTimeoutSeconds)
设置沙箱就绪超时秒。
Performs the sandbox ready timeout seconds operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxReadyTimeoutSeconds | long | 沙箱就绪超时秒(类型 `long`)。The sandbox ready timeout seconds. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:133–136shutdownAfterSeconds
public Builder shutdownAfterSeconds(Long shutdownAfterSeconds)
设置该配置项。
Performs the shutdown after seconds operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
shutdownAfterSeconds | Long | shutdown 之后秒(类型 `Long`)。The shutdown after seconds. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:138–141labels
public Builder labels(Map<String, String> labels)
设置该配置项。
Performs the labels operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
labels | Map<String, String> | labels(类型 `Map`)。The labels. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:143–146podLabels
public Builder podLabels(Map<String, String> podLabels)
设置该配置项。
Performs the pod labels operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
podLabels | Map<String, String> | pod Labels(类型 `Map`)。The pod labels. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:148–151podAnnotations
public Builder podAnnotations(Map<String, String> podAnnotations)
设置该配置项。
Performs the pod annotations operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
podAnnotations | Map<String, String> | pod 注解(类型 `Map`)。The pod annotations. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:153–156build
public CreateSandboxOptions build()
构建并返回最终实例。
Creates and returns an instance.
CreateSandboxOptions返回CreateSandboxOptions。Returns create sandbox options.
源码Source
io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:158–160