DeletedSessionRegistry
@Component public class DeletedSessionRegistry
源码Source
io/agentscope/builder/web/managed/service/DeletedSessionRegistry.java:33–58已删除会话注册表,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.managed.service 包。核心成员包括 markDeleted、isDeleted。
Tracks sessions that were deleted while work was still in flight.
Interrupting a harness turn is not immediate: a turn keeps running for seconds after its session row is gone, and its trailing writes would recreate exactly the rows teardown just removed. Session-scoped write paths consult this registry and drop such writes.
Only the most recent ids are kept. Session ids are never reused, so forgetting an old one can at worst let a very long-lived turn write again.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void markDeleted(String sessionId) | 设置该参数。 Records that `sessionId` is gone, so later writes for it must be dropped. |
public boolean isDeleted(String sessionId) | 判断是否已删除。 True when writes for `sessionId` should be dropped. |
方法详情Method Detail
markDeleted
public void markDeleted(String sessionId)
设置该参数。
Records that sessionId is gone, so later writes for it must be dropped.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
源码Source
io/agentscope/builder/web/managed/service/DeletedSessionRegistry.java:48–52isDeleted
public boolean isDeleted(String sessionId)
判断是否已删除。
True when writes for sessionId should be dropped.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/builder/web/managed/service/DeletedSessionRegistry.java:55–57