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.State
-
Constructor Summary
ConstructorDescriptionDbJobState
(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext, int partitionId) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Note: calling this method will reset the variables of the job record.void
void
void
void
void
boolean
exists
(long jobKey) void
long
findBackedOffJobs
(long timestamp, BiPredicate<Long, JobRecord> callback) void
forEachActivatableJobs
(org.agrona.DirectBuffer type, BiFunction<Long, JobRecord, Boolean> callback) void
forEachTimedOutEntry
(long upperBound, BiFunction<Long, JobRecord, Boolean> callback) getJob
(long key) getState
(long key) boolean
isInState
(long key, JobState.State state) void
recurAfterBackoff
(long key, JobRecord record) void
void
setJobsAvailableCallback
(Consumer<String> onJobsAvailableCallback) void
throwError
(long key, JobRecord updatedValue) void
updateJobRetries
(long jobKey, int retries)
-
Constructor Details
-
DbJobState
public DbJobState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext, int partitionId)
-
-
Method Details
-
create
- Specified by:
create
in interfaceMutableJobState
-
activate
Note: calling this method will reset the variables of the job record. Make sure to write the job record to the log before updating it in the state.related to https://github.com/zeebe-io/zeebe/issues/2182
- Specified by:
activate
in interfaceMutableJobState
-
recurAfterBackoff
- Specified by:
recurAfterBackoff
in interfaceMutableJobState
-
timeout
- Specified by:
timeout
in interfaceMutableJobState
-
complete
- Specified by:
complete
in interfaceMutableJobState
-
cancel
- Specified by:
cancel
in interfaceMutableJobState
-
disable
- Specified by:
disable
in interfaceMutableJobState
-
throwError
- Specified by:
throwError
in interfaceMutableJobState
-
delete
- Specified by:
delete
in interfaceMutableJobState
-
fail
- Specified by:
fail
in interfaceMutableJobState
-
resolve
- Specified by:
resolve
in interfaceMutableJobState
-
updateJobRetries
- Specified by:
updateJobRetries
in interfaceMutableJobState
-
forEachTimedOutEntry
- Specified by:
forEachTimedOutEntry
in interfaceJobState
-
exists
public boolean exists(long jobKey) -
getState
-
isInState
-
forEachActivatableJobs
public void forEachActivatableJobs(org.agrona.DirectBuffer type, BiFunction<Long, JobRecord, Boolean> callback) - Specified by:
forEachActivatableJobs
in interfaceJobState
-
getJob
-
setJobsAvailableCallback
- Specified by:
setJobsAvailableCallback
in interfaceJobState
-
findBackedOffJobs
- Specified by:
findBackedOffJobs
in interfaceJobState
-