Record Class DistributedStore.CompositeDistributedStore
- All Implemented Interfaces:
DistributedStore
- Enclosing interface:
- DistributedStore
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.agentscope.harness.agent.DistributedStore
DistributedStore.Builder, DistributedStore.CompositeDistributedStore -
Constructor Summary
ConstructorsConstructorDescriptionCompositeDistributedStore(io.agentscope.core.state.AgentStateStore stateStore, BaseStore store, SandboxSnapshotSpec snapshotSpec, SandboxExecutionGuard executionGuard, MessageBus bus, AsyncToolRegistry toolRegistry, TaskRepository tasks, SessionTurnGate turnGate, TeamClient teams) Creates an instance of aCompositeDistributedStorerecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.agentscope.core.state.AgentStateStoreCreates theAgentStateStorefor agent session state persistence.Creates anAsyncToolRegistryfor tracking async tool executions.Creates theBaseStorefor workspace filesystem KV storage.bus()Returns the value of thebusrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexecutionGuardrecord component.final inthashCode()Returns a hash code value for this object.Creates aMessageBusfor inbox-based message delivery and session event streaming.Creates theSandboxExecutionGuardfor distributed sandbox concurrency control.Creates theSandboxSnapshotSpecfor sandbox snapshot persistence.Creates aSessionTurnGatefor distributed per-session turn serialization.Returns the value of thesnapshotSpecrecord component.io.agentscope.core.state.AgentStateStoreReturns the value of thestateStorerecord component.store()Returns the value of thestorerecord component.Creates aTaskRepositoryfor distributed subagent background tasks.tasks()Returns the value of thetasksrecord component.Creates aTeamClientfor AgentTeams coordination.teams()Returns the value of theteamsrecord component.Returns the value of thetoolRegistryrecord component.final StringtoString()Returns a string representation of this record class.turnGate()Returns the value of theturnGaterecord component.
-
Constructor Details
-
CompositeDistributedStore
public CompositeDistributedStore(io.agentscope.core.state.AgentStateStore stateStore, BaseStore store, SandboxSnapshotSpec snapshotSpec, SandboxExecutionGuard executionGuard, MessageBus bus, AsyncToolRegistry toolRegistry, TaskRepository tasks, SessionTurnGate turnGate, TeamClient teams) Creates an instance of aCompositeDistributedStorerecord class.- Parameters:
stateStore- the value for thestateStorerecord componentstore- the value for thestorerecord componentsnapshotSpec- the value for thesnapshotSpecrecord componentexecutionGuard- the value for theexecutionGuardrecord componentbus- the value for thebusrecord componenttoolRegistry- the value for thetoolRegistryrecord componenttasks- the value for thetasksrecord componentturnGate- the value for theturnGaterecord componentteams- the value for theteamsrecord component
-
-
Method Details
-
agentStateStore
public io.agentscope.core.state.AgentStateStore agentStateStore()Description copied from interface:DistributedStoreCreates theAgentStateStorefor agent session state persistence.- Specified by:
agentStateStorein interfaceDistributedStore- Returns:
- a distributed agent state store; must not be
null
-
baseStore
Description copied from interface:DistributedStoreCreates theBaseStorefor workspace filesystem KV storage.- Specified by:
baseStorein interfaceDistributedStore- Returns:
- a distributed base store; must not be
null
-
sandboxSnapshotSpec
Description copied from interface:DistributedStoreCreates theSandboxSnapshotSpecfor sandbox snapshot persistence.Override this when the store supports binary blob storage suitable for Docker sandbox snapshots. The default returns
NoopSnapshotSpec(no snapshots).- Specified by:
sandboxSnapshotSpecin interfaceDistributedStore- Returns:
- a sandbox snapshot spec; must not be
null
-
sandboxExecutionGuard
Description copied from interface:DistributedStoreCreates theSandboxExecutionGuardfor distributed sandbox concurrency control.Override this when the store supports distributed locking. The default returns a no-op guard (no cross-node coordination).
- Specified by:
sandboxExecutionGuardin interfaceDistributedStore- Returns:
- a sandbox execution guard; must not be
null
-
messageBus
Description copied from interface:DistributedStoreCreates aMessageBusfor inbox-based message delivery and session event streaming.Override this when the store supports real-time transport (e.g. Redis Pub/Sub). The default returns
null, which signals HarnessAgent to fall back to a workspace-backed implementation created from the resolvedAbstractFilesystem.- Specified by:
messageBusin interfaceDistributedStore- Returns:
- a message bus, or
nullto use the workspace default
-
asyncToolRegistry
Description copied from interface:DistributedStoreCreates anAsyncToolRegistryfor tracking async tool executions.Override this when the store supports persistent key-value storage. The default returns
null, which signals HarnessAgent to fall back to a workspace-backed implementation.- Specified by:
asyncToolRegistryin interfaceDistributedStore- Returns:
- an async tool registry, or
nullto use the workspace default
-
taskRepository
Description copied from interface:DistributedStoreCreates aTaskRepositoryfor distributed subagent background tasks.Override this when the store supports hosted task persistence (e.g. control-plane
/api/v1/dp/tasks/*). The default returnsnull, which signals HarnessAgent to fall back to a workspace-backedWorkspaceTaskRepository.- Specified by:
taskRepositoryin interfaceDistributedStore- Returns:
- a task repository, or
nullto use the workspace default
-
sessionTurnGate
Description copied from interface:DistributedStoreCreates aSessionTurnGatefor distributed per-session turn serialization.Override this when the store supports hosted locks (e.g. control-plane
/api/v1/dp/locks/*). The default returnsnull, which signals HarnessAgent to use the gateway's built-inLocalSessionTurnGate.When a distributed turn gate is used, configure
ReActAgentconflictPolicytoFAILso concurrent state writes surface as errors rather than silent overwrites.- Specified by:
sessionTurnGatein interfaceDistributedStore- Returns:
- a session turn gate, or
nullto use the process-local default
-
teamClient
Description copied from interface:DistributedStoreCreates aTeamClientfor AgentTeams coordination.Override when the store hosts team task/message APIs (control plane) or can back a local CAS client. The default returns
null.- Specified by:
teamClientin interfaceDistributedStore- Returns:
- a team client, or
nullwhen teams mode is unavailable
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
stateStore
public io.agentscope.core.state.AgentStateStore stateStore()Returns the value of thestateStorerecord component.- Returns:
- the value of the
stateStorerecord component
-
store
Returns the value of thestorerecord component.- Returns:
- the value of the
storerecord component
-
snapshotSpec
Returns the value of thesnapshotSpecrecord component.- Returns:
- the value of the
snapshotSpecrecord component
-
executionGuard
Returns the value of theexecutionGuardrecord component.- Returns:
- the value of the
executionGuardrecord component
-
bus
Returns the value of thebusrecord component.- Returns:
- the value of the
busrecord component
-
toolRegistry
Returns the value of thetoolRegistryrecord component.- Returns:
- the value of the
toolRegistryrecord component
-
tasks
Returns the value of thetasksrecord component.- Returns:
- the value of the
tasksrecord component
-
turnGate
Returns the value of theturnGaterecord component.- Returns:
- the value of the
turnGaterecord component
-
teams
Returns the value of theteamsrecord component.- Returns:
- the value of the
teamsrecord component
-