AS AgentScopeAPI 手册 / API Reference

ShutdownStateSaver

@FunctionalInterface public interface ShutdownStateSaver
源码Source io/agentscope/core/shutdown/ShutdownStateSaver.java:28–37

定义 Shutdown 状态 Saver契约的接口。位于 io.agentscope.core.shutdown 包。核心成员包括 save。

Strategy for persisting AgentState during graceful shutdown.

Implementations are registered via GracefulShutdownManager#bindStateSaver(io.agentscope.core.agent.Agent, ShutdownStateSaver) so the shutdown manager can checkpoint agent state without depending on the legacy io.agentscope.core.state.AgentStateStore API.

方法摘要Method Summary

方法Method说明Description
public void save(AgentState state)
保存数据到持久化存储。
Persist the given agent state snapshot.

方法详情Method Detail

save

public void save(AgentState state)

保存数据到持久化存储。

Persist the given agent state snapshot.

参数Parameters
名称Name类型Type说明Description
stateAgentState状态对象(类型 `AgentState`)。the current agent state (with `shutdownInterrupted` already set)
源码Source io/agentscope/core/shutdown/ShutdownStateSaver.java:36
基于官方固定版本源码静态生成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.