TurnLease
public interface TurnLease extends AutoCloseable
源码Source
io/agentscope/harness/agent/gateway/TurnLease.java:25–34定义轮次 Lease契约的接口。位于 io.agentscope.harness.agent.gateway 包,实现 AutoCloseable。核心成员包括 close。
A handle representing an acquired session turn slot.
Returned by SessionTurnGate#acquire(String). The gateway closes the lease in
doFinally after the turn completes. Implementations must be idempotent: calling
#close() more than once must be safe.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void close() | 关闭连接并释放相关资源。 Releases the turn slot held by this lease. |
方法详情Method Detail
close
public void close()
关闭连接并释放相关资源。
Releases the turn slot held by this lease.
源码Source
io/agentscope/harness/agent/gateway/TurnLease.java:32–33