Class DbFormState
java.lang.Object
io.camunda.zeebe.engine.state.deployment.DbFormState
- All Implemented Interfaces:
FormState
,MutableFormState
-
Constructor Summary
ConstructorDescriptionDbFormState
(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Deletes a form from FORM_BY_ID_AND_VERSION column familyvoid
Deletes a form from FORMS column familyvoid
Deletes 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.int
getNextFormVersion
(String formId, String tenantId) Gets the next version a form of a given id will receive.void
Put the given form in FORM_BY_ID_AND_VERSION column familyvoid
Put the given form in FORMS column familyvoid
updateLatestVersion
(FormRecord record) Update the latest version of the form if it is newer.
-
Constructor Details
-
DbFormState
-
-
Method Details
-
storeFormInFormColumnFamily
Description copied from interface:MutableFormState
Put the given form in FORMS column family- Specified by:
storeFormInFormColumnFamily
in interfaceMutableFormState
- Parameters:
record
- the record of the form
-
storeFormInFormByIdAndVersionColumnFamily
Description copied from interface:MutableFormState
Put the given form in FORM_BY_ID_AND_VERSION column family- Specified by:
storeFormInFormByIdAndVersionColumnFamily
in interfaceMutableFormState
- Parameters:
record
- the record of the form
-
updateLatestVersion
Description copied from interface:MutableFormState
Update the latest version of the form if it is newer.- Specified by:
updateLatestVersion
in interfaceMutableFormState
- Parameters:
record
- the record of the form
-
deleteFormInFormsColumnFamily
Description copied from interface:MutableFormState
Deletes a form from FORMS column family- Specified by:
deleteFormInFormsColumnFamily
in interfaceMutableFormState
- Parameters:
record
- the record of the form that is deleted
-
deleteFormInFormByIdAndVersionColumnFamily
Description copied from interface:MutableFormState
Deletes a form from FORM_BY_ID_AND_VERSION column family- Specified by:
deleteFormInFormByIdAndVersionColumnFamily
in interfaceMutableFormState
- Parameters:
record
- the record of the form that is deleted
-
deleteFormInFormVersionColumnFamily
Description copied from interface:MutableFormState
Deletes a form from FORM_VERSION column family- Specified by:
deleteFormInFormVersionColumnFamily
in interfaceMutableFormState
- Parameters:
record
- the record of the form that is deleted
-
findLatestFormById
Description copied from interface:FormState
Query forms by the given form id and return the latest version of the form.- Specified by:
findLatestFormById
in 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:FormState
Query forms by the given form key and return the form.- Specified by:
findFormByKey
in 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:FormState
Gets 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:
getNextFormVersion
in interfaceFormState
- Parameters:
formId
- the id of the form
-
clearCache
public void clearCache()- Specified by:
clearCache
in interfaceFormState
-