Builder
final class Builder
io/agentscope/harness/agent/DistributedStore.java:207–323构建器,用于构建并配置目标实例。位于 io.agentscope.harness.agent 包。核心成员包括 agentStateStore、baseStore、sandboxSnapshotSpec、sandboxExecutionGuard、messageBus、asyncToolRegistry。
Builder for composing a DistributedStore from individual components.
方法摘要Method Summary
方法详情Method Detail
agentStateStore
public Builder agentStateStore(AgentStateStore agentStateStore)
设置智能体状态存储。
Sets the agent state store component.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentStateStore | AgentStateStore | 状态存储到使用。the state store to use |
Builderio/agentscope/harness/agent/DistributedStore.java:227–230baseStore
public Builder baseStore(BaseStore baseStore)
设置基类存储。
Sets the base store component for workspace filesystem KV.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
baseStore | BaseStore | 基类存储到使用。the base store to use |
Builderio/agentscope/harness/agent/DistributedStore.java:238–241sandboxSnapshotSpec
public Builder sandboxSnapshotSpec(SandboxSnapshotSpec sandboxSnapshotSpec)
设置沙箱快照规格。
Sets the sandbox snapshot spec.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxSnapshotSpec | SandboxSnapshotSpec | 快照规格到使用。the snapshot spec to use |
Builderio/agentscope/harness/agent/DistributedStore.java:249–252sandboxExecutionGuard
public Builder sandboxExecutionGuard(SandboxExecutionGuard sandboxExecutionGuard)
设置沙箱执行守卫。
Sets the sandbox execution guard for distributed concurrency control.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxExecutionGuard | SandboxExecutionGuard | 执行守卫到使用。the execution guard to use |
Builderio/agentscope/harness/agent/DistributedStore.java:260–263messageBus
public Builder messageBus(MessageBus messageBus)
设置消息总线。
Performs the message bus operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
messageBus | MessageBus | 消息总线(类型 `MessageBus`)。The message bus. |
Builderio/agentscope/harness/agent/DistributedStore.java:265–268asyncToolRegistry
public Builder asyncToolRegistry(AsyncToolRegistry asyncToolRegistry)
设置异步工具注册表。
Performs the async tool registry operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
asyncToolRegistry | AsyncToolRegistry | 异步工具注册表(类型 `AsyncToolRegistry`)。The async tool registry. |
Builderio/agentscope/harness/agent/DistributedStore.java:270–273taskRepository
public Builder taskRepository(TaskRepository taskRepository)
设置任务仓库。
Performs the task repository operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskRepository | TaskRepository | 任务仓库(类型 `TaskRepository`)。The task repository. |
Builderio/agentscope/harness/agent/DistributedStore.java:275–278sessionTurnGate
public Builder sessionTurnGate(SessionTurnGate sessionTurnGate)
设置该配置项。
Sets the session turn gate for distributed per-session turn serialization.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionTurnGate | SessionTurnGate | 会话轮次 Gate(类型 `SessionTurnGate`)。the turn gate to use |
Builderio/agentscope/harness/agent/DistributedStore.java:286–289teamClient
public Builder teamClient(TeamClient teamClient)
设置AgentTeams 客户端。
Sets the AgentTeams client.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
teamClient | TeamClient | 团队客户端(类型 `TeamClient`)。The team client. |
Builderio/agentscope/harness/agent/DistributedStore.java:292–295build
public DistributedStore build()
构建并返回最终实例。
Builds the composite DistributedStore.
DistributedStoreNullPointerException当if agentStateStore 或 baseStore是不设置时抛出 `NullPointerException`。if agentStateStore or baseStore is not set
io/agentscope/harness/agent/DistributedStore.java:303–322