类 InMemoryPlanStorage

java.lang.Object
io.agentscope.core.plan.storage.InMemoryPlanStorage
所有已实现的接口:
PlanStorage

public class InMemoryPlanStorage extends Object implements PlanStorage
In-memory implementation of PlanStorage.

Stores plans in a concurrent hash map for thread-safe access. This implementation is suitable for development and testing. For production use cases requiring persistence, implement a database-backed storage.

  • 构造器详细资料

    • InMemoryPlanStorage

      public InMemoryPlanStorage()
  • 方法详细资料

    • addPlan

      public reactor.core.publisher.Mono<Void> addPlan(Plan plan)
      Adds a plan to the storage.

      If a plan with the same ID already exists, it will be replaced.

      指定者:
      addPlan 在接口中 PlanStorage
      参数:
      plan - The plan to store
      返回:
      A Mono that completes when the plan is stored
    • getPlan

      public reactor.core.publisher.Mono<Plan> getPlan(String planId)
      Retrieves a plan by its ID.
      指定者:
      getPlan 在接口中 PlanStorage
      参数:
      planId - The unique identifier of the plan
      返回:
      A Mono emitting the plan if found, or empty if not found
    • getPlans

      public reactor.core.publisher.Mono<List<Plan>> getPlans()
      Retrieves all stored plans.
      指定者:
      getPlans 在接口中 PlanStorage
      返回:
      A Mono emitting a list of all plans (may be empty)