Class DbProcessState
java.lang.Object
io.camunda.zeebe.engine.state.deployment.DbProcessState
- All Implemented Interfaces:
ProcessState,MutableProcessState
-
Constructor Summary
ConstructorsConstructorDescriptionDbProcessState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidTODO: Remove the cache entirely from the immutable statevoiddeleteProcess(ProcessRecord processRecord) Deletes a process fromm the state and cachefindProcessVersionBefore(String bpmnProcessId, long version, String tenantId) Finds the previous known version a process.<T extends ExecutableFlowElement>
TgetFlowElement(long processDefinitionKey, String tenantId, org.agrona.DirectBuffer elementId, Class<T> elementType) intgetLatestProcessVersion(String bpmnProcessId, String tenantId) Gets the latest process version.getLatestProcessVersionByProcessId(org.agrona.DirectBuffer processIdBuffer, String tenantId) org.agrona.DirectBuffergetLatestVersionDigest(org.agrona.DirectBuffer processIdBuffer, String tenantId) intgetNextProcessVersion(String bpmnProcessId, String tenantId) Gets the next version a process of a given id will receive.getProcessByKeyAndTenant(long key, String tenantId) getProcessByProcessIdAndVersion(org.agrona.DirectBuffer processId, int version, String tenantId) voidputDeployment(DeploymentRecord deploymentRecord) voidputLatestVersionDigest(ProcessRecord processRecord) voidputProcess(long key, ProcessRecord processRecord) voidupdateProcessState(ProcessRecord processRecord, PersistedProcess.PersistedProcessState state) Updates the state of a process.
-
Constructor Details
-
DbProcessState
-
-
Method Details
-
putDeployment
- Specified by:
putDeploymentin interfaceMutableProcessState
-
putLatestVersionDigest
- Specified by:
putLatestVersionDigestin interfaceMutableProcessState
-
putProcess
- Specified by:
putProcessin interfaceMutableProcessState
-
updateProcessState
public void updateProcessState(ProcessRecord processRecord, PersistedProcess.PersistedProcessState state) Description copied from interface:MutableProcessStateUpdates the state of a process. This method updates both the ColumnFamily and the in memory cache.- Specified by:
updateProcessStatein interfaceMutableProcessState- Parameters:
processRecord- the record of the process that is updatedstate- the new state
-
deleteProcess
Description copied from interface:MutableProcessStateDeletes a process fromm the state and cache- Specified by:
deleteProcessin interfaceMutableProcessState- Parameters:
processRecord- the record of the process that is deleted
-
getLatestProcessVersionByProcessId
public DeployedProcess getLatestProcessVersionByProcessId(org.agrona.DirectBuffer processIdBuffer, String tenantId) - Specified by:
getLatestProcessVersionByProcessIdin interfaceProcessState
-
getProcessByProcessIdAndVersion
public DeployedProcess getProcessByProcessIdAndVersion(org.agrona.DirectBuffer processId, int version, String tenantId) - Specified by:
getProcessByProcessIdAndVersionin interfaceProcessState
-
getProcessByKeyAndTenant
- Specified by:
getProcessByKeyAndTenantin interfaceProcessState
-
getLatestVersionDigest
public org.agrona.DirectBuffer getLatestVersionDigest(org.agrona.DirectBuffer processIdBuffer, String tenantId) - Specified by:
getLatestVersionDigestin interfaceProcessState
-
getLatestProcessVersion
Description copied from interface:ProcessStateGets the latest process version. This is the latest version for which we have a process in the state. It is not necessarily the latest version we've ever known for this process id, as process could be deleted.- Specified by:
getLatestProcessVersionin interfaceProcessState- Parameters:
bpmnProcessId- the id of the process
-
getNextProcessVersion
Description copied from interface:ProcessStateGets the next version a process of a given id will receive. This is used, for example, when a new deployment is done. Using this method we decide the version the newly deployed process receives.- Specified by:
getNextProcessVersionin interfaceProcessState- Parameters:
bpmnProcessId- the id of the process
-
findProcessVersionBefore
public Optional<Integer> findProcessVersionBefore(String bpmnProcessId, long version, String tenantId) Description copied from interface:ProcessStateFinds the previous known version a process. This is used, for example, when a process is deleted and the timers of the previous process need to be activated.If not previous version is found, an empty optional is returned.
- Specified by:
findProcessVersionBeforein interfaceProcessState- Parameters:
bpmnProcessId- the id of the processversion- the version for which we want to find the previous version
-
getFlowElement
public <T extends ExecutableFlowElement> T getFlowElement(long processDefinitionKey, String tenantId, org.agrona.DirectBuffer elementId, Class<T> elementType) - Specified by:
getFlowElementin interfaceProcessState
-
clearCache
public void clearCache()Description copied from interface:ProcessStateTODO: Remove the cache entirely from the immutable state- Specified by:
clearCachein interfaceProcessState
-