Class DbJobState
java.lang.Object
io.camunda.zeebe.engine.state.instance.DbJobState
- All Implemented Interfaces:
JobState,MutableJobState
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.engine.state.immutable.JobState
JobState.DeadlineIndex, JobState.State -
Constructor Summary
ConstructorsConstructorDescriptionDbJobState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidbooleanexists(long jobKey) voidlongfindBackedOffJobs(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) voidvoidrecurAfterBackoff(long key, JobRecord record) voidvoidvoidthrowError(long key, JobRecord updatedValue) voidvoidupdateJobDeadline(long jobKey, long newDeadline) updateJobRetries(long jobKey, int retries) void
-
Constructor Details
-
DbJobState
-
-
Method Details
-
create
- Specified by:
createin interfaceMutableJobState
-
activate
- Specified by:
activatein interfaceMutableJobState
-
recurAfterBackoff
- Specified by:
recurAfterBackoffin interfaceMutableJobState
-
timeout
- Specified by:
timeoutin interfaceMutableJobState
-
complete
- Specified by:
completein interfaceMutableJobState
-
cancel
- Specified by:
cancelin interfaceMutableJobState
-
disable
- Specified by:
disablein interfaceMutableJobState
-
throwError
- Specified by:
throwErrorin interfaceMutableJobState
-
delete
- Specified by:
deletein interfaceMutableJobState
-
fail
- Specified by:
failin interfaceMutableJobState
-
yield
- Specified by:
yieldin interfaceMutableJobState
-
resolve
- Specified by:
resolvein interfaceMutableJobState
-
updateJobRetries
- Specified by:
updateJobRetriesin interfaceMutableJobState
-
cleanupTimeoutsWithoutJobs
public void cleanupTimeoutsWithoutJobs()- Specified by:
cleanupTimeoutsWithoutJobsin interfaceMutableJobState
-
cleanupBackoffsWithoutJobs
public void cleanupBackoffsWithoutJobs()- Specified by:
cleanupBackoffsWithoutJobsin interfaceMutableJobState
-
updateJobDeadline
public void updateJobDeadline(long jobKey, long newDeadline) - Specified by:
updateJobDeadlinein interfaceMutableJobState
-
migrate
- Specified by:
migratein interfaceMutableJobState
-
restoreBackoff
public void restoreBackoff()- Specified by:
restoreBackoffin interfaceMutableJobState
-
forEachTimedOutEntry
public JobState.DeadlineIndex forEachTimedOutEntry(long executionTimestamp, JobState.DeadlineIndex startAt, BiPredicate<Long, JobRecord> callback) Description copied from interface:JobStateLoops over all timed-out job entries and applies the provided callback.- Specified by:
forEachTimedOutEntryin interfaceJobState- 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
public boolean exists(long jobKey) -
getState
-
isInState
-
forEachActivatableJobs
public void forEachActivatableJobs(org.agrona.DirectBuffer type, List<String> tenantIds, BiFunction<Long, JobRecord, Boolean> callback) - Specified by:
forEachActivatableJobsin interfaceJobState
-
getJob
-
getJob
-
jobDeadlineExists
public boolean jobDeadlineExists(long jobKey, long deadline) - Specified by:
jobDeadlineExistsin interfaceJobState
-
findBackedOffJobs
- Specified by:
findBackedOffJobsin interfaceJobState
-