InMemoryAgentRegistry
public final class InMemoryAgentRegistry implements AgentRegistry
源码Source
io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:27–58In 记忆智能体注册表,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.admin.registry 包,实现 AgentRegistry。核心成员包括 register、unregister、find、list、size。
Single-node, in-memory AgentRegistry suitable as the starter default.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void register(Agent agent) | 设置注册。 Performs the register operation. |
public void unregister(String agentId) | 设置注销。 Performs the unregister operation. |
public Optional<Agent> find(String agentId) | 设置查找。 Performs the find operation. |
public List<Agent> list() | 返回列表。 Returns the list. |
public int size() | 返回大小。 Returns the size. |
方法详情Method Detail
register
public void register(Agent agent)
设置注册。
Performs the register operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
源码Source
io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:31–35unregister
public void unregister(String agentId)
设置注销。
Performs the unregister operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentId | String | 智能体标识(类型 `String`)。The agent id. |
源码Source
io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:37–42find
public Optional<Agent> find(String agentId)
设置查找。
Performs the find operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentId | String | 智能体标识(类型 `String`)。The agent id. |
Optional<Agent>返回可选。Returns optional.
源码Source
io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:44–47list
public List<Agent> list()
返回列表。
Returns the list.
List<Agent>返回列出。Returns list.
源码Source
io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:49–52size
public int size()
返回大小。
Returns the size.
int返回数值结果。Returns a numeric result.
源码Source
io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:54–57