AS AgentScopeAPI 手册 / API Reference

InMemoryMapping

public class InMemoryMapping extends Mapping
源码Source io/agentscope/runtime/common/collections/InMemoryMapping.java:27–63

In 记忆 Mapping,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.common.collections 包,继承自 Mapping。核心成员包括 set、get、delete、scan、InMemoryMapping。

In-memory implementation of the Mapping interface.

构造器摘要Constructor Summary

构造器Constructor说明Description
public InMemoryMapping()
初始化 `InMemoryMapping` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public void set(String key, Object value)
执行设置相关操作。
Performs the set operation.
public Object get(String key)
按条件读取数据。
Performs the get operation.
public void delete(String key)
删除数据。
Performs the delete operation.
public List<String> scan(String prefix)
设置该参数。
Performs the scan operation.

构造器详情Constructor Detail

InMemoryMapping

public InMemoryMapping()

初始化 InMemoryMapping 实例。

Creates a new instance.

源码Source io/agentscope/runtime/common/collections/InMemoryMapping.java:30–32

方法详情Method Detail

set

public void set(String key, Object value)

执行设置相关操作。

Performs the set operation.

参数Parameters
名称Name类型Type说明Description
keyString键(类型 `String`)。The key.
valueObject值(类型 `Object`)。The value.
源码Source io/agentscope/runtime/common/collections/InMemoryMapping.java:34–37

get

public Object get(String key)

按条件读取数据。

Performs the get operation.

参数Parameters
名称Name类型Type说明Description
keyString键(类型 `String`)。The key.
返回Returns Object
返回对象。Returns object.
源码Source io/agentscope/runtime/common/collections/InMemoryMapping.java:39–42

delete

public void delete(String key)

删除数据。

Performs the delete operation.

参数Parameters
名称Name类型Type说明Description
keyString键(类型 `String`)。The key.
源码Source io/agentscope/runtime/common/collections/InMemoryMapping.java:44–47

scan

public List<String> scan(String prefix)

设置该参数。

Performs the scan operation.

参数Parameters
名称Name类型Type说明Description
prefixStringprefix(类型 `String`)。The prefix.
返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/runtime/common/collections/InMemoryMapping.java:49–62
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.