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 |
|---|---|---|
state | AgentState | 状态对象(类型 `AgentState`)。the current agent state (with `shutdownInterrupted` already set) |
源码Source
io/agentscope/core/shutdown/ShutdownStateSaver.java:36