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.
  • Method Details

    • tryEnter

      public SandboxLease tryEnter(SandboxIsolationKey key)
      Description copied from interface: SandboxExecutionGuard
      Acquires the execution right for the given isolation key, blocking until the slot becomes available or the calling thread is interrupted.

      The returned SandboxLease must be closed to release the slot. The harness handles this automatically; callers do not need to close the lease explicitly.

      Specified by:
      tryEnter in interface SandboxExecutionGuard
      Parameters:
      key - the isolation key that identifies the sandbox slot to protect
      Returns:
      a lease that releases the execution right when closed