Class JobClaimService
java.lang.Object
com.bluebell.greenhouse.radicle.services.job.JobClaimService
Atomically claims due PostgreSQL-backed work and manages database concurrency slots.
- Version:
- 3.0.6
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclaimDueJobs(String workerId, int batchSize) Claims due work using row locks that skip candidates owned by another dispatcher.voidreleaseSlot(JobClaim claim) Releases a concurrency slot after terminal completion.voidreleaseUnstarted(JobClaim claim) Returns a claim to the queue when the local executor rejects it before execution.booleanrenewLease(JobClaim claim) Renews a lease while the claim is still current.
-
Constructor Details
-
JobClaimService
public JobClaimService()
-
-
Method Details
-
claimDueJobs
-
renewLease
Renews a lease while the claim is still current.- Parameters:
claim- current claim- Returns:
- true when renewed
-
releaseSlot
Releases a concurrency slot after terminal completion.- Parameters:
claim- completed claim
-
releaseUnstarted
Returns a claim to the queue when the local executor rejects it before execution.- Parameters:
claim- rejected claim
-