Class JobWorkerRegistry
java.lang.Object
com.bluebell.greenhouse.radicle.services.job.JobWorkerRegistry
Tracks claims this application process has accepted, from the moment they are handed to the
worker pool until execution ends. Membership is what the heartbeat renews, so a claim is
registered before it is submitted rather than once a thread picks it up.
- Version:
- 3.0.6
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters an accepted claim.intsize()Returns how many claims this process currently holds.snapshot()Returns an immutable accepted-claim snapshot.voidunregister(JobClaim claim) Removes a finished or rejected claim.
-
Constructor Details
-
JobWorkerRegistry
public JobWorkerRegistry()
-
-
Method Details
-
register
Registers an accepted claim.- Parameters:
claim- accepted claim
-
unregister
Removes a finished or rejected claim.- Parameters:
claim- claim to remove
-
size
public int size()Returns how many claims this process currently holds.- Returns:
- accepted claim count
-
snapshot
-