类 InMemoryPlanStorage
java.lang.Object
io.agentscope.core.plan.storage.InMemoryPlanStorage
- 所有已实现的接口:
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
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
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
Retrieves all stored plans.- 指定者:
getPlans在接口中PlanStorage- 返回:
- A Mono emitting a list of all plans (may be empty)
-