MongoSnapshotSpec
public class MongoSnapshotSpec extends RemoteSnapshotSpec
源码Source
io/agentscope/extensions/mongodb/snapshot/MongoSnapshotSpec.java:28–37Mongo 快照规格,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.extensions.mongodb.snapshot 包,继承自 RemoteSnapshotSpec。核心成员包括 MongoSnapshotSpec。
Convenience io.agentscope.harness.agent.sandbox.snapshot.SandboxSnapshotSpec for
MongoDB-backed snapshot storage.
Stores sandbox workspace tar archives in MongoDB GridFS, which transparently chunks data into 255 KB segments and supports files up to 16 GB.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public MongoSnapshotSpec(MongoClient mongoClient, String databaseName) | 初始化 `MongoSnapshotSpec` 实例。 Creates a new instance. |
public MongoSnapshotSpec(MongoClient mongoClient, String databaseName, String collectionName) | 初始化 `MongoSnapshotSpec` 实例。 Creates a new instance. |
构造器详情Constructor Detail
MongoSnapshotSpec
public MongoSnapshotSpec(MongoClient mongoClient, String databaseName)
初始化 MongoSnapshotSpec 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
mongoClient | MongoClient | mongo 客户端(类型 `MongoClient`)。The mongo client. |
databaseName | String | 数据库名称(类型 `String`)。The database name. |
源码Source
io/agentscope/extensions/mongodb/snapshot/MongoSnapshotSpec.java:30–32MongoSnapshotSpec
public MongoSnapshotSpec(MongoClient mongoClient, String databaseName, String collectionName)
初始化 MongoSnapshotSpec 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
mongoClient | MongoClient | mongo 客户端(类型 `MongoClient`)。The mongo client. |
databaseName | String | 数据库名称(类型 `String`)。The database name. |
collectionName | String | 集合名称(类型 `String`)。The collection name. |
源码Source
io/agentscope/extensions/mongodb/snapshot/MongoSnapshotSpec.java:34–36