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) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidDeletes a form from FORM_BY_ID_AND_VERSION column familyvoidDeletes a form from FORMS column familyvoidDeletes a form from FORM_VERSION column familyfindFormByKey(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 familyvoidupdateLatestVersion(FormRecord record) Update the latest version of the form if it is newer.
-
Constructor Details
-
DbFormState
-
-
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
-
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
-
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
-
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
-