AS AgentScopeAPI 手册 / API Reference

KubernetesSandboxState

public class KubernetesSandboxState extends SandboxState
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:21–110

Kubernetes 沙箱状态,在隔离环境中安全执行代码和工具。位于 io.agentscope.extensions.sandbox.kubernetes 包,继承自 SandboxState。核心成员包括 getNamespace、setNamespace、getClaimName、setClaimName、getSandboxName、setSandboxName。

Serializable state for an agent-sandbox-backed Kubernetes sandbox.

方法摘要Method Summary

方法Method说明Description
public String getNamespace()
获取命名空间。
Returns the namespace.
public void setNamespace(String namespace)
设置命名空间。
Sets the namespace.
public String getClaimName()
获取 `getClaimName`。
Returns the claim name.
public void setClaimName(String claimName)
设置 `setClaimName`。
Sets the claim name.
public String getSandboxName()
获取沙箱名称。
Returns the sandbox name.
public void setSandboxName(String sandboxName)
设置沙箱名称。
Sets the sandbox name.
public String getWarmPoolName()
获取 `getWarmPoolName`。
Returns the warm pool name.
public void setWarmPoolName(String warmPoolName)
设置 `setWarmPoolName`。
Sets the warm pool name.
public String getPodName()
获取 `getPodName`。
Returns the pod name.
public void setPodName(String podName)
设置 `setPodName`。
Sets the pod name.
public String getPodIP()
获取 `getPodIP`。
Returns the pod IP.
public void setPodIP(String podIP)
设置 `setPodIP`。
Sets the pod IP.
public String getWorkspaceRoot()
获取工作区根。
Returns the workspace root.
public void setWorkspaceRoot(String workspaceRoot)
设置工作区根。
Sets the workspace root.
public String getFileApiBaseDir()
获取文件 API 基类目录。
Returns the file api base dir.
public void setFileApiBaseDir(String fileApiBaseDir)
设置文件 API 基类目录。
Sets the file api base dir.
public boolean isClaimOwned()
判断是否 `isClaimOwned`。
Returns whether the claim owned.
public void setClaimOwned(boolean claimOwned)
设置 `setClaimOwned`。
Sets the claim owned.

方法详情Method Detail

getNamespace

public String getNamespace()

获取命名空间。

Returns the namespace.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:39–41

setNamespace

public void setNamespace(String namespace)

设置命名空间。

Sets the namespace.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:43–45

getClaimName

public String getClaimName()

获取 getClaimName。

Returns the claim name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:47–49

setClaimName

public void setClaimName(String claimName)

设置 setClaimName。

Sets the claim name.

参数Parameters
名称Name类型Type说明Description
claimNameStringclaim 名称(类型 `String`)。The claim name.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:51–53

getSandboxName

public String getSandboxName()

获取沙箱名称。

Returns the sandbox name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:55–57

setSandboxName

public void setSandboxName(String sandboxName)

设置沙箱名称。

Sets the sandbox name.

参数Parameters
名称Name类型Type说明Description
sandboxNameString沙箱名称(类型 `String`)。The sandbox name.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:59–61

getWarmPoolName

public String getWarmPoolName()

获取 getWarmPoolName。

Returns the warm pool name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:63–65

setWarmPoolName

public void setWarmPoolName(String warmPoolName)

设置 setWarmPoolName。

Sets the warm pool name.

参数Parameters
名称Name类型Type说明Description
warmPoolNameStringwarm 连接池名称(类型 `String`)。The warm pool name.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:67–69

getPodName

public String getPodName()

获取 getPodName。

Returns the pod name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:71–73

setPodName

public void setPodName(String podName)

设置 setPodName。

Sets the pod name.

参数Parameters
名称Name类型Type说明Description
podNameStringpod 名称(类型 `String`)。The pod name.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:75–77

getPodIP

public String getPodIP()

获取 getPodIP。

Returns the pod IP.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:79–81

setPodIP

public void setPodIP(String podIP)

设置 setPodIP。

Sets the pod IP.

参数Parameters
名称Name类型Type说明Description
podIPStringpod IP(类型 `String`)。The pod IP.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:83–85

getWorkspaceRoot

public String getWorkspaceRoot()

获取工作区根。

Returns the workspace root.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:87–89

setWorkspaceRoot

public void setWorkspaceRoot(String workspaceRoot)

设置工作区根。

Sets the workspace root.

参数Parameters
名称Name类型Type说明Description
workspaceRootString工作区根(类型 `String`)。The workspace root.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:91–93

getFileApiBaseDir

public String getFileApiBaseDir()

获取文件 API 基类目录。

Returns the file api base dir.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:95–97

setFileApiBaseDir

public void setFileApiBaseDir(String fileApiBaseDir)

设置文件 API 基类目录。

Sets the file api base dir.

参数Parameters
名称Name类型Type说明Description
fileApiBaseDirString文件 API 基类目录(类型 `String`)。The file api base dir.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:99–101

isClaimOwned

public boolean isClaimOwned()

判断是否 isClaimOwned。

Returns whether the claim owned.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:103–105

setClaimOwned

public void setClaimOwned(boolean claimOwned)

设置 setClaimOwned。

Sets the claim owned.

参数Parameters
名称Name类型Type说明Description
claimOwnedbooleanclaim Owned(类型 `boolean`)。The claim owned.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:107–109

继承成员Inherited Members

基于官方固定版本源码静态生成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.