ArrayFilterCalculateEffectiveness Method |
Namespace: Tangosol.Util.Filter
public abstract int CalculateEffectiveness( IDictionary indexes, ICollection keys )
The returned value is an effectiveness estimate of how well this filter can use the specified indexes to filter the specified keys. An operation that requires no more than a single access to the index content (i.e. Equals, NotEquals) has an effectiveness of one. Evaluation of a single entry is assumed to have an effectiveness that depends on the index implementation and is usually measured as a constant number of the single operations. This number is referred to as evaluation cost.
If the effectiveness of a filter evaluates to a number larger than the keys.size() then a user could avoid using the index and iterate through the keys calling Evaluate rather than ApplyIndex.