WorkItem
public static final class WorkItem
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:41–165Work 条目,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.managed 包。核心成员包括 withMetadata、id、workId、leaseId、sessionId、environmentId。
A class in io.agentscope.builder.web.managed that deploys, schedules and serves agents. Declared in io.agentscope.builder.web.managed.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public WorkItem withMetadata(Map<String, Object> metadata) | 执行使用元数据相关操作。 Returns a copy with session staging metadata attached for the worker. |
public String id() | 返回标识。 Returns the id. |
public String workId() | 返回 `workId` 结果。 Returns the work id. |
public String leaseId() | 返回 `leaseId` 结果。 Returns the lease id. |
public String sessionId() | 返回会话标识。 Returns the session id. |
public String environmentId() | 返回环境标识。 Returns the environment id. |
public String ownerId() | 返回所有者标识。 Returns the owner id. |
public long createdAt() | 返回已创建 At。 Returns the created at. |
public long updatedAt() | 返回已更新 At。 Returns the updated at. |
public Status status() | 返回状态。 Returns the status. |
public String claimedBy() | 返回 `claimedBy` 结果。 Returns the claimed by. |
public String workDir() | 返回 `workDir` 结果。 Returns the work dir. |
public Map<String, Object> metadata() | 返回元数据。 Session staging hints (`input_file` / `files` / `resources`). |
方法详情Method Detail
withMetadata
public WorkItem withMetadata(Map<String, Object> metadata)
执行使用元数据相关操作。
Returns a copy with session staging metadata attached for the worker.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
metadata | Map<String, Object> | 元数据(类型 `Map`)。The metadata. |
WorkItem返回WorkItem。Returns work item.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:91–103id
public String id()
返回标识。
Returns the id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:105–108workId
public String workId()
返回 workId 结果。
Returns the work id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:110–113leaseId
public String leaseId()
返回 leaseId 结果。
Returns the lease id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:115–118sessionId
public String sessionId()
返回会话标识。
Returns the session id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:120–123environmentId
public String environmentId()
返回环境标识。
Returns the environment id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:125–128ownerId
public String ownerId()
返回所有者标识。
Returns the owner id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:130–133createdAt
public long createdAt()
返回已创建 At。
Returns the created at.
long返回数值结果。Returns a numeric result.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:135–138updatedAt
public long updatedAt()
返回已更新 At。
Returns the updated at.
long返回数值结果。Returns a numeric result.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:140–143status
public Status status()
返回状态。
Returns the status.
Status返回状态。Returns status.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:145–148claimedBy
public String claimedBy()
返回 claimedBy 结果。
Returns the claimed by.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:150–153workDir
public String workDir()
返回 workDir 结果。
Returns the work dir.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:155–158metadata
public Map<String, Object> metadata()
返回元数据。
Session staging hints (input_file / files / resources).
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/builder/web/managed/EnvironmentWorkQueue.java:161–164