AS AgentScopeAPI 手册 / API Reference

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
sessionIdString会话标识(类型 `String`)。The session id.
源码Source io/agentscope/builder/web/managed/service/DeletedSessionRegistry.java:48–52

isDeleted

public boolean isDeleted(String sessionId)

判断是否已删除。

True when writes for sessionId should be dropped.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/builder/web/managed/service/DeletedSessionRegistry.java:55–57
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.