#include <coherence/util/aggregator/DistinctValues.hpp>
Inherits AbstractAggregator.
If the set of entries is empty, an empty set is returned.
This aggregator could be used in combination with coherence::util::extractor::MultiExtractor allowing to collect all unique combinations (tuples) of a given set of attributes.
The DistinctValues aggregator covers a simple case of a more generic aggregation pattern implemented by the GroupAggregator, which in addition to collecting all distinct values or tuples, runs an aggregation against each distinct entry set (group).
| Public Types | |||||||
| typedef spec::Handle | Handle | ||||||
| DistinctValues Handle definition. | |||||||
| typedef spec::View | View | ||||||
| DistinctValues View definition. | |||||||
| typedef spec::Holder | Holder | ||||||
| DistinctValues Holder definition. | |||||||
| Protected Member Functions | |||||||
| DistinctValues () | |||||||
| Default constructor (necessary for the PortableObject interface). | |||||||
| DistinctValues (ValueExtractor::View vExtractor) | |||||||
| Construct a DistinceValues aggregator. | |||||||
| virtual void | init (bool fFinal) | ||||||
| Initialize the aggregation result. 
 
 | |||||||
| virtual void | process (Object::View vO, bool fFinal) | ||||||
| Incorporate one aggregatable value into the result. 
If the  
 
 | |||||||
| virtual Object::Holder | finalizeResult (bool fFinal) | ||||||
| Obtain the result of the aggregation. 
If the  
 
 
 | |||||||
| virtual Set::Handle | ensureSet () | ||||||
| Return a set that can be used to store distinct values, creating it if one has not already been created. | |||||||
| Protected Attributes | |||||||
| MemberHandle< Set > | m_hSet | ||||||
| The resulting set of distinct values. | |||||||
| DistinctValues | ( | ValueExtractor::View | vExtractor | ) |  [protected] | 
Construct a DistinceValues aggregator.
| vExtractor | the extractor that provides a value in the form of any object | 
| virtual Set::Handle ensureSet | ( | ) |  [protected, virtual] | 
Return a set that can be used to store distinct values, creating it if one has not already been created.