LocalSnapshotSpec
public class LocalSnapshotSpec implements SandboxSnapshotSpec
源码Source
io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:25–65本地快照规格,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.sandbox.snapshot 包,实现 SandboxSnapshotSpec。核心成员包括 build、getBasePath、LocalSnapshotSpec。
Snapshot spec that creates LocalSandboxSnapshot instances stored in a local directory.
Each session gets its own snapshot file at {basePath}/{sessionId}.tar.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public LocalSnapshotSpec(Path basePath) | 创建本地快照规格。 Creates a local snapshot spec. |
public LocalSnapshotSpec(String basePath) | 创建本地快照规格。 Creates a local snapshot spec. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public SandboxSnapshot build(String snapshotId) | 构建并返回最终实例。 {@inheritDoc} |
public String getBasePath() | 获取基类路径。 Returns the base directory used for snapshot files. |
构造器详情Constructor Detail
LocalSnapshotSpec
public LocalSnapshotSpec(Path basePath)
创建本地快照规格。
Creates a local snapshot spec.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
basePath | Path | 基类路径(类型 `Path`)。directory where snapshot tar files will be stored |
源码Source
io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:34–36LocalSnapshotSpec
public LocalSnapshotSpec(String basePath)
创建本地快照规格。
Creates a local snapshot spec.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
basePath | String | 基类路径(类型 `String`)。directory path string where snapshot tar files will be stored |
源码Source
io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:43–45方法详情Method Detail
build
public SandboxSnapshot build(String snapshotId)
构建并返回最终实例。
{@inheritDoc}
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
snapshotId | String | 快照标识(类型 `String`)。The snapshot id. |
SandboxSnapshot返回SandboxSnapshot。a new `LocalSandboxSnapshot` storing at `{basePath}/{snapshotId}.tar`
源码Source
io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:52–55getBasePath
public String getBasePath()
获取基类路径。
Returns the base directory used for snapshot files.
String返回字符串结果。base path string
源码Source
io/agentscope/harness/agent/sandbox/snapshot/LocalSnapshotSpec.java:62–64