Interface DecisionState
- All Known Subinterfaces:
MutableDecisionState
- All Known Implementing Classes:
DbDecisionState
public interface DecisionState
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Completely clears all caches.findDecisionByTenantAndKey
(String tenantId, long decisionKey) Query decisions by the given decision key and return the decision.findDecisionRequirementsByTenantAndKey
(String tenantId, long decisionRequirementsKey) Query decision requirements (DRGs) by the given decision requirements key.findDecisionsByTenantAndDecisionRequirementsKey
(String tenantId, long decisionRequirementsKey) Query decisions by the given decision requirements (DRG) key.findLatestDecisionByIdAndTenant
(org.agrona.DirectBuffer decisionId, String tenantId) Query decisions by the given decision id and return the latest version of the decision.findLatestDecisionRequirementsByTenantAndId
(String tenantId, org.agrona.DirectBuffer decisionRequirementsId) Query decision requirements (DRGs) by the given decision requirements id and return the latest version of the DRG.
-
Method Details
-
findLatestDecisionByIdAndTenant
Optional<PersistedDecision> findLatestDecisionByIdAndTenant(org.agrona.DirectBuffer decisionId, String tenantId) Query decisions by the given decision id and return the latest version of the decision.- Parameters:
decisionId
- the id of the decisiontenantId
- the tenant the decision belongs to- Returns:
- the latest version of the decision, or
Optional.empty()
if no decision is deployed with the given id
-
findDecisionByTenantAndKey
Query decisions by the given decision key and return the decision.- Parameters:
tenantId
- the tenant the decision belongs todecisionKey
- the key of the decision- Returns:
- the decision, or
Optional.empty()
if no decision is deployed with the given key
-
findLatestDecisionRequirementsByTenantAndId
Optional<DeployedDrg> findLatestDecisionRequirementsByTenantAndId(String tenantId, org.agrona.DirectBuffer decisionRequirementsId) Query decision requirements (DRGs) by the given decision requirements id and return the latest version of the DRG.- Parameters:
tenantId
- the tenant the DRG belongs todecisionRequirementsId
- the id of the DRG- Returns:
- the latest version of the DRG, or
Optional.empty()
if no DRG is deployed with the given id
-
findDecisionRequirementsByTenantAndKey
Optional<DeployedDrg> findDecisionRequirementsByTenantAndKey(String tenantId, long decisionRequirementsKey) Query decision requirements (DRGs) by the given decision requirements key.- Parameters:
tenantId
- the tenant the DRG belongs todecisionRequirementsKey
- the key of the DRG- Returns:
- the DRG, or
Optional.empty()
if no DRG is deployed with the given key
-
findDecisionsByTenantAndDecisionRequirementsKey
List<PersistedDecision> findDecisionsByTenantAndDecisionRequirementsKey(String tenantId, long decisionRequirementsKey) Query decisions by the given decision requirements (DRG) key.- Parameters:
tenantId
- the tenant the DRG belongs todecisionRequirementsKey
- 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.
-