AS AgentScopeAPI 手册 / API Reference

Builder

public static final class Builder
源码Source io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:103–161

CreateSandboxOptions的构建器。位于 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
namespaceString命名空间(类型 `String`)。The namespace.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:117–120

claimName

public Builder claimName(String claimName)

设置该配置项。

Sets an explicit SandboxClaim name (used by the harness adapter to encode session id).

参数Parameters
名称Name类型Type说明Description
claimNameStringclaim 名称(类型 `String`)。claim resource name
返回Returns Builder
返回当前实例,以支持链式调用。this builder
源码Source io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:128–131

sandboxReadyTimeoutSeconds

public Builder sandboxReadyTimeoutSeconds(long sandboxReadyTimeoutSeconds)

设置沙箱就绪超时秒。

Performs the sandbox ready timeout seconds operation.

参数Parameters
名称Name类型Type说明Description
sandboxReadyTimeoutSecondslong沙箱就绪超时秒(类型 `long`)。The sandbox ready timeout seconds.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:133–136

shutdownAfterSeconds

public Builder shutdownAfterSeconds(Long shutdownAfterSeconds)

设置该配置项。

Performs the shutdown after seconds operation.

参数Parameters
名称Name类型Type说明Description
shutdownAfterSecondsLongshutdown 之后秒(类型 `Long`)。The shutdown after seconds.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:138–141

labels

public Builder labels(Map<String, String> labels)

设置该配置项。

Performs the labels operation.

参数Parameters
名称Name类型Type说明Description
labelsMap<String, String>labels(类型 `Map`)。The labels.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:143–146

podLabels

public Builder podLabels(Map<String, String> podLabels)

设置该配置项。

Performs the pod labels operation.

参数Parameters
名称Name类型Type说明Description
podLabelsMap<String, String>pod Labels(类型 `Map`)。The pod labels.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:148–151

podAnnotations

public Builder podAnnotations(Map<String, String> podAnnotations)

设置该配置项。

Performs the pod annotations operation.

参数Parameters
名称Name类型Type说明Description
podAnnotationsMap<String, String>pod 注解(类型 `Map`)。The pod annotations.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:153–156

build

public CreateSandboxOptions build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns CreateSandboxOptions
返回CreateSandboxOptions。Returns create sandbox options.
源码Source io/agentscope/extensions/sandbox/kubernetes/client/CreateSandboxOptions.java:158–160
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.