[#BloombergLP-ball-AttributeContext_RuleEvaluationCache-update] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/AttributeContext_RuleEvaluationCache.adoc[AttributeContext_RuleEvaluationCache]::update :relfileprefix: ../../../ :mrdocs: Update the cache of rule evaluations for the specified sequence number and rules. == Synopsis Declared in `<ball_attributecontext.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/RuleSet/MaskType.adoc[RuleSet::MaskType] update( xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] sequenceNumber, xref:BloombergLP/ball/RuleSet/MaskType.adoc[RuleSet::MaskType] relevantRulesMask, xref:BloombergLP/ball/RuleSet.adoc[RuleSet] const& rules, xref:BloombergLP/ball/AttributeContainerList.adoc[AttributeContainerList] const& attributes); ---- == Description Update, for the specified `sequenceNumber`, the cache for those rules indicated by the specified `relevantRulesMask` bit mask in the specified set of `rules`, by evaluating those rules for the specified `attributes`; return the bit mask indicating those rules that are known to be active. If a bit in the returned bit mask value is set to 1, the rule at the corresponding index in `rules` is "active"; however, if a bit is set to 0, the corresponding rule is either not active _or_ has not been evaluated. This operation does, however, guarantee that all the rules indicated by the `relevantRulesMask` _will_ be evaluated. A particular rule is considered "active" if all of its attributes are satisfied by `attributes` (i.e., if `Rule::evaluate` returns `true` for `attributes`). The behavior is undefined unless `rules` is not modified during this operation (i.e., any lock associated with `rules` must be locked during this operation). == Return Value bit mask of rules known to be active == Parameters [cols="1,4"] |=== | Name| Description | *sequenceNumber* | rule‐set sequence number for this update | *relevantRulesMask* | bit mask of rules to evaluate and cache | *rules* | set of rules to evaluate | *attributes* | attribute containers used to evaluate the rules |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#