Collapse All Expand All

C#

Oracle® Coherence .NET API Reference
GroupAggregator Class
Members See Also

Oracle® Coherence .NET API Reference Release 3.6.1
E18812-01
The GroupAggregator provides an ability to split a subset of entries in an IInvocableCache into a collection of non-intersecting subsets and then aggregate them separately and independently.

Namespace: Tangosol.Util.Aggregator
Assembly: Coherence (in Coherence.dll) Version: 3.6.1.0 (3.6.1.0)

# Syntax

C#
    public class GroupAggregator : IEntryAggregator,
    	IPortableObject

# Remarks

The splitting (grouping) is performed using the results of the underlying IValueExtractor in such a way that two entries will belong to the same group if and only if the result of the corresponding Extract(Object) call produces the same value or tuple (list of values). After the entries are split into the groups, the underlying aggregator is applied separately to each group. The result of the aggregation by the GroupAggregator is a dictionary that has distinct values (or tuples) as keys and results of the individual aggregation as values. Additionally, those results could be further reduced using an optional IFilter object.

Informally speaking, this aggregator is analogous to the SQL "group by" and "having" clauses. Note that the "having" IFilter is applied independently on each server against the partial aggregation results; this generally implies that data affinity is required to ensure that all required data used to generate a given result exists within a single cache partition. In other words, the "group by" predicate should not span multiple partitions if the "having" clause is used.

The GroupAggregator is somewhat similar to the DistinctValues aggregator, which returns back a list of distinct values (tuples) without performing any additional aggregation work.

Unlike many other concrete IEntryAggregator implementations that are constructed directly, instances of GroupAggregator should only be created using one of the factory methods:

CreateInstance(IValueExtractor, IEntryAggregator) CreateInstance(IValueExtractor, IEntryAggregator, IFilter) CreateInstance(String, IEntryAggregator) CreateInstance(String, IEntryAggregator, IFilter)

# Inheritance Hierarchy

System..::.Object
Tangosol.Util.Aggregator..::.GroupAggregator
Tangosol.Util.Aggregator..::.GroupAggregator..::.Parallel

# See Also

GroupAggregator Members
Tangosol.Util.Aggregator Namespace