Class DbDecisionState

java.lang.Object
io.camunda.zeebe.engine.state.deployment.DbDecisionState
All Implemented Interfaces:
DecisionState, MutableDecisionState

public final class DbDecisionState extends Object implements MutableDecisionState
  • Constructor Details

  • Method Details

    • findLatestDecisionById

      public Optional<PersistedDecision> findLatestDecisionById(org.agrona.DirectBuffer decisionId)
      Description copied from interface: DecisionState
      Query decisions by the given decision id and return the latest version of the decision.
      Specified by:
      findLatestDecisionById in interface DecisionState
      Parameters:
      decisionId - the id of the decision
      Returns:
      the latest version of the decision, or Optional.empty() if no decision is deployed with the given id
    • findDecisionByKey

      public Optional<PersistedDecision> findDecisionByKey(long decisionKey)
      Description copied from interface: DecisionState
      Query decisions by the given decision key and return the decision.
      Specified by:
      findDecisionByKey in interface DecisionState
      Parameters:
      decisionKey - the key of the decision
      Returns:
      the decision, or Optional.empty() if no decision is deployed with the given key
    • findLatestDecisionRequirementsById

      public Optional<DeployedDrg> findLatestDecisionRequirementsById(org.agrona.DirectBuffer decisionRequirementsId)
      Description copied from interface: DecisionState
      Query decision requirements (DRGs) by the given decision requirements id and return the latest version of the DRG.
      Specified by:
      findLatestDecisionRequirementsById in interface DecisionState
      Parameters:
      decisionRequirementsId - the id of the DRG
      Returns:
      the latest version of the DRG, or Optional.empty() if no DRG is deployed with the given id
    • findDecisionRequirementsByKey

      public Optional<DeployedDrg> findDecisionRequirementsByKey(long decisionRequirementsKey)
      Description copied from interface: DecisionState
      Query decision requirements (DRGs) by the given decision requirements key.
      Specified by:
      findDecisionRequirementsByKey in interface DecisionState
      Parameters:
      decisionRequirementsKey - the key of the DRG
      Returns:
      the DRG, or Optional.empty() if no DRG is deployed with the given key
    • findDecisionsByDecisionRequirementsKey

      public List<PersistedDecision> findDecisionsByDecisionRequirementsKey(long decisionRequirementsKey)
      Description copied from interface: DecisionState
      Query decisions by the given decision requirements (DRG) key.
      Specified by:
      findDecisionsByDecisionRequirementsKey in interface DecisionState
      Parameters:
      decisionRequirementsKey - the key of the DRG
      Returns:
      all decisions that belong to the given DRG, or an empty list if no decision belongs to it
    • clearCache

      public void clearCache()
      Description copied from interface: DecisionState
      Completely clears all caches.
      Specified by:
      clearCache in interface DecisionState
    • storeDecisionRecord

      public void storeDecisionRecord(DecisionRecord record)
      Description copied from interface: MutableDecisionState
      Put the given decision in the state. Update the latest version of the decision if it is newer.
      Specified by:
      storeDecisionRecord in interface MutableDecisionState
      Parameters:
      record - the record of the decision
    • storeDecisionRequirements

      public void storeDecisionRequirements(DecisionRequirementsRecord record)
      Description copied from interface: MutableDecisionState
      Put the given decision requirements (DRG) in the state. Update the latest version of the DRG if it is newer.
      Specified by:
      storeDecisionRequirements in interface MutableDecisionState
      Parameters:
      record - the record of the DRG
    • deleteDecision

      public void deleteDecision(DecisionRecord record)
      Description copied from interface: MutableDecisionState
      Deletes a decision from the state. Updates the latest version of the decision if the deleted version is the latest version and a previous version is available.
      Specified by:
      deleteDecision in interface MutableDecisionState
      Parameters:
      record - the record of the decision
    • deleteDecisionRequirements

      public void deleteDecisionRequirements(DecisionRequirementsRecord record)
      Description copied from interface: MutableDecisionState
      Deletes a decision requirements from the state. Updates the latest version of the decision requirements if the deleted version is the latest version and a previous version is available.
      Specified by:
      deleteDecisionRequirements in interface MutableDecisionState
      Parameters:
      record - the record of the decision requirements