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) Finds the previous known version a process.<T extends ExecutableFlowElement>
TgetFlowElement(long processDefinitionKey, org.agrona.DirectBuffer elementId, Class<T> elementType) intgetLatestProcessVersion(String bpmnProcessId) Gets the latest process version.getLatestProcessVersionByProcessId(org.agrona.DirectBuffer processIdBuffer) org.agrona.DirectBuffergetLatestVersionDigest(org.agrona.DirectBuffer processIdBuffer) intgetNextProcessVersion(String bpmnProcessId) Gets the next version a process of a given id will receive.getProcessByKey(long key) getProcessByProcessIdAndVersion(org.agrona.DirectBuffer processId, int version) getProcessesByBpmnProcessId(org.agrona.DirectBuffer bpmnProcessId) voidputDeployment(DeploymentRecord deploymentRecord) voidputLatestVersionDigest(org.agrona.DirectBuffer processIdBuffer, org.agrona.DirectBuffer digest) voidputProcess(long key, ProcessRecord processRecord) voidupdateProcessState(long processDefinitionKey, PersistedProcess.PersistedProcessState state) Updates the state of a process.
-
Constructor Details
-
DbProcessState
-
-
Method Details
-
putDeployment
- Specified by:
putDeploymentin interfaceMutableProcessState
-
putLatestVersionDigest
public void putLatestVersionDigest(org.agrona.DirectBuffer processIdBuffer, org.agrona.DirectBuffer digest) - Specified by:
putLatestVersionDigestin interfaceMutableProcessState
-
putProcess
- Specified by:
putProcessin interfaceMutableProcessState
-
updateProcessState
public void updateProcessState(long processDefinitionKey, 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:
processDefinitionKey- the key of the process definitionstate- 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
- Specified by:
getLatestProcessVersionByProcessIdin interfaceProcessState
-
getProcessByProcessIdAndVersion
public DeployedProcess getProcessByProcessIdAndVersion(org.agrona.DirectBuffer processId, int version) - Specified by:
getProcessByProcessIdAndVersionin interfaceProcessState
-
getProcessByKey
- Specified by:
getProcessByKeyin interfaceProcessState
-
getProcesses
- Specified by:
getProcessesin interfaceProcessState
-
getProcessesByBpmnProcessId
public Collection<DeployedProcess> getProcessesByBpmnProcessId(org.agrona.DirectBuffer bpmnProcessId) - Specified by:
getProcessesByBpmnProcessIdin interfaceProcessState
-
getLatestVersionDigest
public org.agrona.DirectBuffer getLatestVersionDigest(org.agrona.DirectBuffer processIdBuffer) - 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
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, 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
-