AS AgentScopeAPI 手册 / API Reference

CoordWorkItemEntityRepository

public interface CoordWorkItemEntityRepository extends JpaRepository<CoordWorkItemEntity, Long>
源码Source 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说明Description
public Optional<CoordWorkItemEntity> findByLeaseId(String leaseId)
查找 `findByLeaseId`。
Finds the by lease id.
public Optional<CoordWorkItemEntity> findFirstBySessionIdAndStatusInOrderByCreatedAtDesc(String sessionId, List<String> statuses)
查找 `findFirstBySessionIdAndStatusInOrderByCreatedAtDesc`。
Finds the first by session id and status in order by created at desc.
public List<CoordWorkItemEntity> findClaimableForPoll(String environmentId, String queued, List<String> reclaimable, long staleBefore)
查找 `findClaimableForPoll`。
Finds the claimable for poll.
public List<CoordWorkItemEntity> findByEnvironmentIdOrderByCreatedAtAsc(String environmentId)
查找 `findByEnvironmentIdOrderByCreatedAtAsc`。
Finds the by environment id order by created at asc.
public List<CoordWorkItemEntity> findByEnvironmentIdAndStatusOrderByCreatedAtAsc(String environmentId, String status)
查找 `findByEnvironmentIdAndStatusOrderByCreatedAtAsc`。
Finds the by environment id and status order by created at asc.
public long countByStatus(String status)
设置数量通过状态。
Performs the count by status operation.
public long countByEnvironmentIdAndStatus(String environmentId, String status)
执行数量通过环境标识和状态相关操作。
Performs the count by environment id and status operation.
public Optional<Long> findOldestCreatedAtByEnvironmentIdAndStatus(String environmentId, String status)
查找 `findOldestCreatedAtByEnvironmentIdAndStatus`。
Finds the oldest created at by environment id and status.

方法详情Method Detail

findByLeaseId

public Optional<CoordWorkItemEntity> findByLeaseId(String leaseId)

查找 findByLeaseId。

Finds the by lease id.

参数Parameters
名称Name类型Type说明Description
leaseIdStringlease 标识(类型 `String`)。The lease id.
返回Returns Optional<CoordWorkItemEntity>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:28

findFirstBySessionIdAndStatusInOrderByCreatedAtDesc

public Optional<CoordWorkItemEntity> findFirstBySessionIdAndStatusInOrderByCreatedAtDesc(String sessionId, List<String> statuses)

查找 findFirstBySessionIdAndStatusInOrderByCreatedAtDesc。

Finds the first by session id and status in order by created at desc.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
statusesList<String>statuses(类型 `List`)。The statuses.
返回Returns Optional<CoordWorkItemEntity>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:30–31

findClaimableForPoll

public List<CoordWorkItemEntity> findClaimableForPoll(String environmentId, String queued, List<String> reclaimable, long staleBefore)

查找 findClaimableForPoll。

Finds the claimable for poll.

参数Parameters
名称Name类型Type说明Description
environmentIdString环境标识(类型 `String`)。The environment id.
queuedString已排队(类型 `String`)。The queued.
reclaimableList<String>reclaimable(类型 `List`)。The reclaimable.
staleBeforelong过期之前(类型 `long`)。The stale before.
返回Returns List<CoordWorkItemEntity>
返回列出。Returns list.
源码Source io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:33–42

findByEnvironmentIdOrderByCreatedAtAsc

public List<CoordWorkItemEntity> findByEnvironmentIdOrderByCreatedAtAsc(String environmentId)

查找 findByEnvironmentIdOrderByCreatedAtAsc。

Finds the by environment id order by created at asc.

参数Parameters
名称Name类型Type说明Description
environmentIdString环境标识(类型 `String`)。The environment id.
返回Returns List<CoordWorkItemEntity>
返回列出。Returns list.
源码Source io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:44

findByEnvironmentIdAndStatusOrderByCreatedAtAsc

public List<CoordWorkItemEntity> findByEnvironmentIdAndStatusOrderByCreatedAtAsc(String environmentId, String status)

查找 findByEnvironmentIdAndStatusOrderByCreatedAtAsc。

Finds the by environment id and status order by created at asc.

参数Parameters
名称Name类型Type说明Description
environmentIdString环境标识(类型 `String`)。The environment id.
statusString状态(类型 `String`)。The status.
返回Returns List<CoordWorkItemEntity>
返回列出。Returns list.
源码Source io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:46–47

countByStatus

public long countByStatus(String status)

设置数量通过状态。

Performs the count by status operation.

参数Parameters
名称Name类型Type说明Description
statusString状态(类型 `String`)。The status.
返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:49

countByEnvironmentIdAndStatus

public long countByEnvironmentIdAndStatus(String environmentId, String status)

执行数量通过环境标识和状态相关操作。

Performs the count by environment id and status operation.

参数Parameters
名称Name类型Type说明Description
environmentIdString环境标识(类型 `String`)。The environment id.
statusString状态(类型 `String`)。The status.
返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:51

findOldestCreatedAtByEnvironmentIdAndStatus

public Optional<Long> findOldestCreatedAtByEnvironmentIdAndStatus(String environmentId, String status)

查找 findOldestCreatedAtByEnvironmentIdAndStatus。

Finds the oldest created at by environment id and status.

参数Parameters
名称Name类型Type说明Description
environmentIdString环境标识(类型 `String`)。The environment id.
statusString状态(类型 `String`)。The status.
返回Returns Optional<Long>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/persistence/jpa/CoordWorkItemEntityRepository.java:53–57
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.