CoordLeaseEntityRepository
public interface CoordLeaseEntityRepository extends JpaRepository<CoordLeaseEntity, Long>
io/agentscope/builder/web/persistence/jpa/CoordLeaseEntityRepository.java:27–59定义 Coord Lease Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<CoordLeaseEntity, Long>。核心成员包括 findByLeaseKindAndLeaseKey、findByKindAndKeyForUpdate、heartbeatIfOwned、findByLeaseKindAndExpiresAtLessThan、findByLeaseKindAndLeaseKeyStartingWithOrderByAcquiredAtAsc、deleteByKindKeyAndInstance。
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
findByLeaseKindAndLeaseKey
public Optional<CoordLeaseEntity> findByLeaseKindAndLeaseKey(String leaseKind, String leaseKey)
查找 findByLeaseKindAndLeaseKey。
Finds the by lease kind and lease key.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
leaseKind | String | lease 种类(类型 `String`)。The lease kind. |
leaseKey | String | lease 键(类型 `String`)。The lease key. |
Optional<CoordLeaseEntity>io/agentscope/builder/web/persistence/jpa/CoordLeaseEntityRepository.java:29findByKindAndKeyForUpdate
public Optional<CoordLeaseEntity> findByKindAndKeyForUpdate(String kind, String key)
查找通过种类和键用于更新。
Finds the by kind and key for update.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
kind | String | 种类(类型 `String`)。The kind. |
key | String | 键(类型 `String`)。The key. |
Optional<CoordLeaseEntity>io/agentscope/builder/web/persistence/jpa/CoordLeaseEntityRepository.java:31–34heartbeatIfOwned
public int heartbeatIfOwned(String kind, String key, String instanceId, long expiresAt)
执行 heartbeatIfOwned 方法。
Performs the heartbeat if owned operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
kind | String | 种类(类型 `String`)。The kind. |
key | String | 键(类型 `String`)。The key. |
instanceId | String | 实例标识(类型 `String`)。The instance id. |
expiresAt | long | 过期 At(类型 `long`)。The expires at. |
intio/agentscope/builder/web/persistence/jpa/CoordLeaseEntityRepository.java:36–44findByLeaseKindAndExpiresAtLessThan
public List<CoordLeaseEntity> findByLeaseKindAndExpiresAtLessThan(String leaseKind, long expiresAt)
查找 findByLeaseKindAndExpiresAtLessThan。
Finds the by lease kind and expires at less than.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
leaseKind | String | lease 种类(类型 `String`)。The lease kind. |
expiresAt | long | 过期 At(类型 `long`)。The expires at. |
List<CoordLeaseEntity>io/agentscope/builder/web/persistence/jpa/CoordLeaseEntityRepository.java:46findByLeaseKindAndLeaseKeyStartingWithOrderByAcquiredAtAsc
public List<CoordLeaseEntity> findByLeaseKindAndLeaseKeyStartingWithOrderByAcquiredAtAsc(String leaseKind, String leaseKeyPrefix)
查找 findByLeaseKindAndLeaseKeyStartingWithOrderByAcquiredAtAsc。
Finds the by lease kind and lease key starting with order by acquired at asc.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
leaseKind | String | lease 种类(类型 `String`)。The lease kind. |
leaseKeyPrefix | String | lease 键 Prefix(类型 `String`)。The lease key prefix. |
List<CoordLeaseEntity>io/agentscope/builder/web/persistence/jpa/CoordLeaseEntityRepository.java:48–49deleteByKindKeyAndInstance
public int deleteByKindKeyAndInstance(String kind, String key, String instanceId)
删除通过种类键和实例。
Deletes the by kind key and instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
kind | String | 种类(类型 `String`)。The kind. |
key | String | 键(类型 `String`)。The key. |
instanceId | String | 实例标识(类型 `String`)。The instance id. |
intio/agentscope/builder/web/persistence/jpa/CoordLeaseEntityRepository.java:51–58