接口 ShutdownStateSaver

函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface ShutdownStateSaver
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 AgentStateStore API.

  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Persist the given agent state snapshot.
  • 方法详细资料

    • save

      void save(AgentState state)
      Persist the given agent state snapshot.
      参数:
      state - the current agent state (with shutdownInterrupted already set)