Class SandboxExecutionGuard.NoopSandboxExecutionGuard
java.lang.Object
io.agentscope.harness.agent.sandbox.SandboxExecutionGuard.NoopSandboxExecutionGuard
- All Implemented Interfaces:
SandboxExecutionGuard
- Enclosing interface:
- SandboxExecutionGuard
public static final class SandboxExecutionGuard.NoopSandboxExecutionGuard
extends Object
implements SandboxExecutionGuard
Singleton no-op implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.agentscope.harness.agent.sandbox.SandboxExecutionGuard
SandboxExecutionGuard.NoopSandboxExecutionGuard -
Method Summary
Modifier and TypeMethodDescriptionAcquires the execution right for the given isolation key, blocking until the slot becomes available or the calling thread is interrupted.
-
Method Details
-
tryEnter
Description copied from interface:SandboxExecutionGuardAcquires the execution right for the given isolation key, blocking until the slot becomes available or the calling thread is interrupted.The returned
SandboxLeasemust be closed to release the slot. The harness handles this automatically; callers do not need to close the lease explicitly.- Specified by:
tryEnterin interfaceSandboxExecutionGuard- Parameters:
key- the isolation key that identifies the sandbox slot to protect- Returns:
- a lease that releases the execution right when closed
-