Class DbFormState
java.lang.Object
io.camunda.zeebe.engine.state.deployment.DbFormState
- All Implemented Interfaces:
FormState,MutableFormState
-
Constructor Summary
ConstructorsConstructorDescriptionDbFormState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext, EngineConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidDeletes a form from FORM_BY_ID_AND_VERSION column familyvoidDeletes a form from FORM_KEY_BY_FORM_ID_AND_DEPLOYMENT_KEY column familyvoidDeletes a form from FORM_KEY_BY_FORM_ID_AND_VERSION_TAG column familyvoidDeletes a form from FORMS column familyvoidDeletes a form from FORM_VERSION column familyfindFormByIdAndDeploymentKey(org.agrona.DirectBuffer formId, long deploymentKey, String tenantId) Query forms by the given form id and deployment key and return the form.findFormByIdAndVersionTag(org.agrona.DirectBuffer formId, String versionTag, String tenantId) Query forms by the given form id and version tag and return the form.findFormByKey(long formKey, String tenantId) Query forms by the given form key and return the form.findLatestFormById(org.agrona.DirectBuffer formId, String tenantId) Query forms by the given form id and return the latest version of the form.intgetNextFormVersion(String formId, String tenantId) Gets the next version a form of a given id will receive.voidPut the given form in FORM_BY_ID_AND_VERSION column familyvoidPut the given form in FORMS column familyvoidPut the given form in FORM_KEY_BY_FORM_ID_AND_DEPLOYMENT_KEY column familyvoidPut the given form in FORM_KEY_BY_FORM_ID_AND_VERSION_TAG column familyvoidupdateLatestVersion(FormRecord record) Update the latest version of the form if it is newer.
-
Constructor Details
-
DbFormState
public DbFormState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext, EngineConfiguration config)
-
-
Method Details
-
storeFormInFormColumnFamily
Description copied from interface:MutableFormStatePut the given form in FORMS column family- Specified by:
storeFormInFormColumnFamilyin interfaceMutableFormState- Parameters:
record- the record of the form
-
storeFormInFormByIdAndVersionColumnFamily
Description copied from interface:MutableFormStatePut the given form in FORM_BY_ID_AND_VERSION column family- Specified by:
storeFormInFormByIdAndVersionColumnFamilyin interfaceMutableFormState- Parameters:
record- the record of the form
-
storeFormInFormKeyByFormIdAndDeploymentKeyColumnFamily
Description copied from interface:MutableFormStatePut the given form in FORM_KEY_BY_FORM_ID_AND_DEPLOYMENT_KEY column family- Specified by:
storeFormInFormKeyByFormIdAndDeploymentKeyColumnFamilyin interfaceMutableFormState- Parameters:
record- the record of the form
-
storeFormInFormKeyByFormIdAndVersionTagColumnFamily
Description copied from interface:MutableFormStatePut the given form in FORM_KEY_BY_FORM_ID_AND_VERSION_TAG column family- Specified by:
storeFormInFormKeyByFormIdAndVersionTagColumnFamilyin interfaceMutableFormState- Parameters:
record- the record of the form
-
updateLatestVersion
Description copied from interface:MutableFormStateUpdate the latest version of the form if it is newer.- Specified by:
updateLatestVersionin interfaceMutableFormState- Parameters:
record- the record of the form
-
deleteFormInFormsColumnFamily
Description copied from interface:MutableFormStateDeletes a form from FORMS column family- Specified by:
deleteFormInFormsColumnFamilyin interfaceMutableFormState- Parameters:
record- the record of the form that is deleted
-
deleteFormInFormByIdAndVersionColumnFamily
Description copied from interface:MutableFormStateDeletes a form from FORM_BY_ID_AND_VERSION column family- Specified by:
deleteFormInFormByIdAndVersionColumnFamilyin interfaceMutableFormState- Parameters:
record- the record of the form that is deleted
-
deleteFormInFormVersionColumnFamily
Description copied from interface:MutableFormStateDeletes a form from FORM_VERSION column family- Specified by:
deleteFormInFormVersionColumnFamilyin interfaceMutableFormState- Parameters:
record- the record of the form that is deleted
-
deleteFormInFormKeyByFormIdAndDeploymentKeyColumnFamily
Description copied from interface:MutableFormStateDeletes a form from FORM_KEY_BY_FORM_ID_AND_DEPLOYMENT_KEY column family- Specified by:
deleteFormInFormKeyByFormIdAndDeploymentKeyColumnFamilyin interfaceMutableFormState- Parameters:
record- the record of the form that is deleted
-
deleteFormInFormKeyByFormIdAndVersionTagColumnFamily
Description copied from interface:MutableFormStateDeletes a form from FORM_KEY_BY_FORM_ID_AND_VERSION_TAG column family- Specified by:
deleteFormInFormKeyByFormIdAndVersionTagColumnFamilyin interfaceMutableFormState- Parameters:
record- the record of the form that is deleted
-
findLatestFormById
Description copied from interface:FormStateQuery forms by the given form id and return the latest version of the form.- Specified by:
findLatestFormByIdin interfaceFormState- Parameters:
formId- the id of the formtenantId- the id of the tenant- Returns:
- the latest version of the form, or
Optional.empty()if no form is deployed with the given id
-
findFormByKey
Description copied from interface:FormStateQuery forms by the given form key and return the form.- Specified by:
findFormByKeyin interfaceFormState- Parameters:
formKey- the key of the formtenantId- the id of the tenant- Returns:
- the form, or
Optional.empty()if no form is deployed with the given key
-
findFormByIdAndDeploymentKey
public Optional<PersistedForm> findFormByIdAndDeploymentKey(org.agrona.DirectBuffer formId, long deploymentKey, String tenantId) Description copied from interface:FormStateQuery forms by the given form id and deployment key and return the form.- Specified by:
findFormByIdAndDeploymentKeyin interfaceFormState- Parameters:
formId- the id of the formdeploymentKey- the key of the deployment the form was deployed withtenantId- the id of the tenant- Returns:
- the form, or
Optional.empty()if no form with the given id was deployed with the given deployment
-
findFormByIdAndVersionTag
public Optional<PersistedForm> findFormByIdAndVersionTag(org.agrona.DirectBuffer formId, String versionTag, String tenantId) Description copied from interface:FormStateQuery forms by the given form id and version tag and return the form.- Specified by:
findFormByIdAndVersionTagin interfaceFormState- Parameters:
formId- the id of the formversionTag- the version tag of the formtenantId- the id of the tenant- Returns:
- the form, or
Optional.empty()if no form with the given id and version tag is deployed
-
getNextFormVersion
Description copied from interface:FormStateGets the next version a form 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 form receives.- Specified by:
getNextFormVersionin interfaceFormState- Parameters:
formId- the id of the form
-
clearCache
public void clearCache()- Specified by:
clearCachein interfaceFormState
-