CoordWorkItemEntityRepository
public interface CoordWorkItemEntityRepository extends JpaRepository<CoordWorkItemEntity, Long>
io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:26–58定义 Coord Work 条目 Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<CoordWorkItemEntity, Long>。核心成员包括 findByLeaseId、findFirstBySessionIdAndStatusInOrderByCreatedAtDesc、findClaimableForPoll、findByEnvironmentIdOrderByCreatedAtAsc、findByEnvironmentIdAndStatusOrderByCreatedAtAsc、countByStatus。
An interface in io.agentscope.builder.web.persistence.jpa that defines the contract for components that persists and restores session and memory data across calls. Declared in io.agentscope.builder.web.persistence.jpa. Implements JpaRepository
方法摘要Method Summary
方法详情Method Detail
findByLeaseId
public Optional<CoordWorkItemEntity> findByLeaseId(String leaseId)
查找 findByLeaseId。
Finds the by lease id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
leaseId | String | lease 标识(类型 `String`)。The lease id. |
Optional<CoordWorkItemEntity>io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:28findFirstBySessionIdAndStatusInOrderByCreatedAtDesc
public Optional<CoordWorkItemEntity> findFirstBySessionIdAndStatusInOrderByCreatedAtDesc(String sessionId, List<String> statuses)
查找 findFirstBySessionIdAndStatusInOrderByCreatedAtDesc。
Finds the first by session id and status in order by created at desc.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
statuses | List<String> | statuses(类型 `List`)。The statuses. |
Optional<CoordWorkItemEntity>io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:30–31findClaimableForPoll
public List<CoordWorkItemEntity> findClaimableForPoll(String environmentId, String queued, List<String> reclaimable, long staleBefore)
查找 findClaimableForPoll。
Finds the claimable for poll.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environmentId | String | 环境标识(类型 `String`)。The environment id. |
queued | String | 已排队(类型 `String`)。The queued. |
reclaimable | List<String> | reclaimable(类型 `List`)。The reclaimable. |
staleBefore | long | 过期之前(类型 `long`)。The stale before. |
List<CoordWorkItemEntity>io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:33–42findByEnvironmentIdOrderByCreatedAtAsc
public List<CoordWorkItemEntity> findByEnvironmentIdOrderByCreatedAtAsc(String environmentId)
查找 findByEnvironmentIdOrderByCreatedAtAsc。
Finds the by environment id order by created at asc.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environmentId | String | 环境标识(类型 `String`)。The environment id. |
List<CoordWorkItemEntity>io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:44findByEnvironmentIdAndStatusOrderByCreatedAtAsc
public List<CoordWorkItemEntity> findByEnvironmentIdAndStatusOrderByCreatedAtAsc(String environmentId, String status)
查找 findByEnvironmentIdAndStatusOrderByCreatedAtAsc。
Finds the by environment id and status order by created at asc.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environmentId | String | 环境标识(类型 `String`)。The environment id. |
status | String | 状态(类型 `String`)。The status. |
List<CoordWorkItemEntity>io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:46–47countByStatus
public long countByStatus(String status)
设置数量通过状态。
Performs the count by status operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
status | String | 状态(类型 `String`)。The status. |
longio/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:49countByEnvironmentIdAndStatus
public long countByEnvironmentIdAndStatus(String environmentId, String status)
执行数量通过环境标识和状态相关操作。
Performs the count by environment id and status operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environmentId | String | 环境标识(类型 `String`)。The environment id. |
status | String | 状态(类型 `String`)。The status. |
longio/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:51findOldestCreatedAtByEnvironmentIdAndStatus
public Optional<Long> findOldestCreatedAtByEnvironmentIdAndStatus(String environmentId, String status)
查找 findOldestCreatedAtByEnvironmentIdAndStatus。
Finds the oldest created at by environment id and status.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environmentId | String | 环境标识(类型 `String`)。The environment id. |
status | String | 状态(类型 `String`)。The status. |
Optional<Long>io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:53–57