Interface DecisionState

All Known Subinterfaces:
MutableDecisionState
All Known Implementing Classes:
DbDecisionState

public interface DecisionState
  • Method Details

    • findLatestDecisionById

      Optional<PersistedDecision> findLatestDecisionById(org.agrona.DirectBuffer decisionId)
      Query decisions by the given decision id and return the latest version of the decision.
      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

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

      Optional<DeployedDrg> findLatestDecisionRequirementsById(org.agrona.DirectBuffer decisionRequirementsId)
      Query decision requirements (DRGs) by the given decision requirements id and return the latest version of the DRG.
      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

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

      List<PersistedDecision> findDecisionsByDecisionRequirementsKey(long decisionRequirementsKey)
      Query decisions by the given decision requirements (DRG) key.
      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

      void clearCache()
      Completely clears all caches.