SandboxLease
public interface SandboxLease extends AutoCloseable
源码Source
io/agentscope/harness/agent/sandbox/SandboxLease.java:27–55定义沙箱 Lease契约的接口。位于 io.agentscope.harness.agent.sandbox 包,实现 AutoCloseable。核心成员包括 close、noop。
A handle that represents a held execution right on a sandbox isolation slot.
Returned by SandboxExecutionGuard#tryEnter. The harness closes the lease
automatically after SandboxManager#release completes (whether the call succeeded or
failed), so implementations do not need to worry about cleanup ordering.
Implementations must be idempotent: calling #close() more than once must be safe.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
NoopSandboxLease | 类class | Noop 沙箱 Lease,承载智能体的部署、调度与服务化运行。 Singleton no-op implementation. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void close() | 关闭连接并释放相关资源。 Releases the execution right held by this lease. |
static public SandboxLease noop()static | 返回 `noop` 结果。 Returns a no-op lease whose `#close()` is a no-op. |
方法详情Method Detail
close
public void close()
关闭连接并释放相关资源。
Releases the execution right held by this lease.
源码Source
io/agentscope/harness/agent/sandbox/SandboxLease.java:34–35noop
static public SandboxLease noop()
static
返回 noop 结果。
Returns a no-op lease whose #close() is a no-op.
SandboxLease返回SandboxLease。Returns sandbox lease.
源码Source
io/agentscope/harness/agent/sandbox/SandboxLease.java:41–43嵌套类详情Nested Class Detail
NoopSandboxLease
final class NoopSandboxLease implements SandboxLeaseNoop 沙箱 Lease,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.sandbox 包,实现 SandboxLease。核心成员包括 close。
Singleton no-op implementation.