Interface JobState
- All Known Subinterfaces:
MutableJobState
- All Known Implementing Classes:
DbJobState
public interface JobState
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordIndex to point to a specific position in the jobs with deadline column family.static enum -
Method Summary
Modifier and TypeMethodDescriptionbooleanexists(long jobKey) longfindBackedOffJobs(long timestamp, BiPredicate<Long, JobRecord> callback) voidforEachActivatableJobs(org.agrona.DirectBuffer type, List<String> tenantIds, BiFunction<Long, JobRecord, Boolean> callback) forEachTimedOutEntry(long executionTimestamp, JobState.DeadlineIndex startAt, BiPredicate<Long, JobRecord> callback) Loops over all timed-out job entries and applies the provided callback.getJob(long key) getState(long key) booleanisInState(long key, JobState.State state) booleanjobDeadlineExists(long jobKey, long deadline)
-
Method Details
-
forEachTimedOutEntry
JobState.DeadlineIndex forEachTimedOutEntry(long executionTimestamp, JobState.DeadlineIndex startAt, BiPredicate<Long, JobRecord> callback) Loops over all timed-out job entries and applies the provided callback.- Parameters:
executionTimestamp- Timestamp against which it's determined whether the deadline has expiredstartAt- Index used to start the iteration at; looping starts at the beginning when startAt isnullcallback- A callback method to be applied to each job entry. It must return a boolean that whentrueallows the loop to continue, or whenfalsestops iteration.- Returns:
- The last visited index where the iteration has stopped because the
callbackmethod returned false ornullif it was not the case.
-
exists
boolean exists(long jobKey) -
getState
-
isInState
-
forEachActivatableJobs
-
getJob
-
getJob
-
jobDeadlineExists
boolean jobDeadlineExists(long jobKey, long deadline) -
findBackedOffJobs
-