Class DbFormState

java.lang.Object
io.camunda.zeebe.engine.state.deployment.DbFormState
All Implemented Interfaces:
FormState, MutableFormState

public class DbFormState extends Object implements MutableFormState
  • Constructor Details

  • Method Details

    • storeFormInFormColumnFamily

      public void storeFormInFormColumnFamily(FormRecord record)
      Description copied from interface: MutableFormState
      Put the given form in FORMS column family
      Specified by:
      storeFormInFormColumnFamily in interface MutableFormState
      Parameters:
      record - the record of the form
    • storeFormInFormByIdAndVersionColumnFamily

      public void storeFormInFormByIdAndVersionColumnFamily(FormRecord record)
      Description copied from interface: MutableFormState
      Put the given form in FORM_BY_ID_AND_VERSION column family
      Specified by:
      storeFormInFormByIdAndVersionColumnFamily in interface MutableFormState
      Parameters:
      record - the record of the form
    • updateLatestVersion

      public void updateLatestVersion(FormRecord record)
      Description copied from interface: MutableFormState
      Update the latest version of the form if it is newer.
      Specified by:
      updateLatestVersion in interface MutableFormState
      Parameters:
      record - the record of the form
    • deleteFormInFormsColumnFamily

      public void deleteFormInFormsColumnFamily(FormRecord record)
      Description copied from interface: MutableFormState
      Deletes a form from FORMS column family
      Specified by:
      deleteFormInFormsColumnFamily in interface MutableFormState
      Parameters:
      record - the record of the form that is deleted
    • deleteFormInFormByIdAndVersionColumnFamily

      public void deleteFormInFormByIdAndVersionColumnFamily(FormRecord record)
      Description copied from interface: MutableFormState
      Deletes a form from FORM_BY_ID_AND_VERSION column family
      Specified by:
      deleteFormInFormByIdAndVersionColumnFamily in interface MutableFormState
      Parameters:
      record - the record of the form that is deleted
    • deleteFormInFormVersionColumnFamily

      public void deleteFormInFormVersionColumnFamily(FormRecord record)
      Description copied from interface: MutableFormState
      Deletes a form from FORM_VERSION column family
      Specified by:
      deleteFormInFormVersionColumnFamily in interface MutableFormState
      Parameters:
      record - the record of the form that is deleted
    • findLatestFormById

      public Optional<PersistedForm> findLatestFormById(org.agrona.DirectBuffer formId, String tenantId)
      Description copied from interface: FormState
      Query forms by the given form id and return the latest version of the form.
      Specified by:
      findLatestFormById in interface FormState
      Parameters:
      formId - the id of the form
      tenantId - 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

      public Optional<PersistedForm> findFormByKey(long formKey, String tenantId)
      Description copied from interface: FormState
      Query forms by the given form key and return the form.
      Specified by:
      findFormByKey in interface FormState
      Parameters:
      formKey - the key of the form
      tenantId - the id of the tenant
      Returns:
      the form, or Optional.empty() if no form is deployed with the given key
    • getNextFormVersion

      public int getNextFormVersion(String formId, String tenantId)
      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 interface FormState
      Parameters:
      formId - the id of the form
    • clearCache

      public void clearCache()
      Specified by:
      clearCache in interface FormState