Class DbDecisionState
java.lang.Object
io.camunda.zeebe.engine.state.deployment.DbDecisionState
- All Implemented Interfaces:
DecisionState,MutableDecisionState
-
Constructor Summary
ConstructorsConstructorDescriptionDbDecisionState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext) -
Method Summary
Modifier and TypeMethodDescriptionfindDecisionByKey(long decisionKey) Query decisions by the given decision key and return the decision.findDecisionRequirementsByKey(long decisionRequirementsKey) Query decision requirements (DRGs) by the given decision requirements key.findDecisionsByDecisionRequirementsKey(long decisionRequirementsKey) Query decisions by the given decision requirements (DRG) key.findLatestDecisionById(org.agrona.DirectBuffer decisionId) Query decisions by the given decision id and return the latest version of the decision.findLatestDecisionRequirementsById(org.agrona.DirectBuffer decisionRequirementsId) Query decision requirements (DRGs) by the given decision requirements id and return the latest version of the DRG.voidstoreDecisionRecord(DecisionRecord record) Put the given decision in the state.voidPut the given decision requirements (DRG) in the state.
-
Constructor Details
-
DbDecisionState
-
-
Method Details
-
findLatestDecisionById
Description copied from interface:DecisionStateQuery decisions by the given decision id and return the latest version of the decision.- Specified by:
findLatestDecisionByIdin interfaceDecisionState- 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
Description copied from interface:DecisionStateQuery decisions by the given decision key and return the decision.- Specified by:
findDecisionByKeyin interfaceDecisionState- 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<PersistedDecisionRequirements> findLatestDecisionRequirementsById(org.agrona.DirectBuffer decisionRequirementsId) Description copied from interface:DecisionStateQuery decision requirements (DRGs) by the given decision requirements id and return the latest version of the DRG.- Specified by:
findLatestDecisionRequirementsByIdin interfaceDecisionState- 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<PersistedDecisionRequirements> findDecisionRequirementsByKey(long decisionRequirementsKey) Description copied from interface:DecisionStateQuery decision requirements (DRGs) by the given decision requirements key.- Specified by:
findDecisionRequirementsByKeyin interfaceDecisionState- Parameters:
decisionRequirementsKey- the key of the DRG- Returns:
- the DRG, or
Optional.empty()if no DRG is deployed with the given key
-
findDecisionsByDecisionRequirementsKey
Description copied from interface:DecisionStateQuery decisions by the given decision requirements (DRG) key.- Specified by:
findDecisionsByDecisionRequirementsKeyin interfaceDecisionState- 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
-
storeDecisionRecord
Description copied from interface:MutableDecisionStatePut the given decision in the state. Update the latest version of the decision if it is newer.- Specified by:
storeDecisionRecordin interfaceMutableDecisionState- Parameters:
record- the record of the decision
-
storeDecisionRequirements
Description copied from interface:MutableDecisionStatePut the given decision requirements (DRG) in the state. Update the latest version of the DRG if it is newer.- Specified by:
storeDecisionRequirementsin interfaceMutableDecisionState- Parameters:
record- the record of the DRG
-