#include <coherence/util/aggregator/ReducerAggregator.hpp>
Inherits AbstractAggregator.
CacheMap::getAll(Collection)
API.
Instead of returning the complete set of values, it will return a portion of value attributes based on the provided ValueExtractor
.
This aggregator could be used in combination with coherence.util.extractor.MultiExtractor
allowing one to collect tuples that are a subset of the attributes of each object stored in the cache.
Public Types | |||||||
typedef spec::Handle | Handle | ||||||
ReducerAggregator Handle definition. | |||||||
typedef spec::View | View | ||||||
ReducerAggregator View definition. | |||||||
typedef spec::Holder | Holder | ||||||
ReducerAggregator Holder definition. | |||||||
Protected Member Functions | |||||||
ReducerAggregator () | |||||||
Default constructor. | |||||||
ReducerAggregator (ValueExtractor::View vExtractor) | |||||||
Construct a ReducerAggregator based on the specified extractor. | |||||||
ReducerAggregator (String::View vsMethod) | |||||||
Construct a ReducerAggregator based on the specified method name. | |||||||
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 Map::Handle | ensureMap () | ||||||
Return a map that can be used to store reduced values, creating it if one has not already been created. |
ReducerAggregator | ( | ValueExtractor::View | vExtractor | ) | [protected] |
Construct a ReducerAggregator based on the specified extractor.
vExtractor | the extractor that is used to extract the portion of the cached value |
ReducerAggregator | ( | String::View | vsMethod | ) | [protected] |
Construct a ReducerAggregator based on the specified method name.
vsMethod | the name of the method that is used to extract the portion of the cached value |
virtual Map::Handle ensureMap | ( | ) | [protected, virtual] |
Return a map that can be used to store reduced values, creating it if one has not already been created.