Show / Hide Table of Contents

Class CompositeAggregator

CompositeAggregator provides an ability to execute a collection of aggregators against the same subset of the entries in an IInvocableCache, resulting in a list of corresponding aggregation results.

Inheritance
object
CompositeAggregator
CompositeAggregator.Parallel
Implements
IEntryAggregator
IPortableObject
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Tangosol.Util.Aggregator
Assembly: Coherence.dll
Syntax
public class CompositeAggregator : IEntryAggregator, IPortableObject
Remarks

The size of the returned list will always be equal to the length of the aggregators' array.

Note: Unlike many other concrete IEntryAggregator implementations that are constructed directly, instances of CompositeAggregator should only be created using the factory method CreateInstance(IEntryAggregator[]).

Constructors

CompositeAggregator()

Default constructor.

Declaration
public CompositeAggregator()

CompositeAggregator(IEntryAggregator[])

Construct a CompositeAggregator based on a specified IEntryAggregator array.

Declaration
protected CompositeAggregator(IEntryAggregator[] aggregators)
Parameters
Type Name Description
IEntryAggregator[] aggregators

An array of IEntryAggregator objects; may not be null.

Fields

m_aggregators

The underlyig IEntryAggregator array.

Declaration
protected IEntryAggregator[] m_aggregators
Field Value
Type Description
IEntryAggregator[]

Methods

Aggregate(ICollection)

Process a set of IInvocableCacheEntry objects in order to produce an aggregated result.

Declaration
public virtual object Aggregate(ICollection entries)
Parameters
Type Name Description
ICollection entries

A collection of read-only IInvocableCacheEntry objects to aggregate.

Returns
Type Description
object

The aggregated result from processing the entries.

CreateInstance(IEntryAggregator[])

Create an instance of CompositeAggregator based on a specified IEntryAggregator array.

Declaration
public static CompositeAggregator CreateInstance(IEntryAggregator[] aggregators)
Parameters
Type Name Description
IEntryAggregator[] aggregators

An array of IEntryAggregator objects; must contain not less than two aggregators.

Returns
Type Description
CompositeAggregator

CompositeAggregator instance.

Remarks

If all the aggregators in the specified array are instances of IParallelAwareAggregator, then a parallel-aware instance of the CompositeAggregator will be created.

If at least one of the specified aggregator is not parallel-aware, then the resulting CompositeAggregator will not be parallel-aware and could be ill-suited for aggregations run against large partitioned caches.

Equals(object)

Compare the CompositeAggregator with another object to determine equality.

Declaration
public override bool Equals(object o)
Parameters
Type Name Description
object o

The CompositeAggregator to compare to.

Returns
Type Description
bool

true if this CompositeAggregator and the passed object are equivalent.

Overrides
object.Equals(object)

GetHashCode()

Determine a hash value for the CompositeAggregator object according to the general object.GetHashCode() contract.

Declaration
public override int GetHashCode()
Returns
Type Description
int

An integer hash value for this object.

Overrides
object.GetHashCode()

ReadExternal(IPofReader)

Restore the contents of a user type instance by reading its state using the specified IPofReader object.

Declaration
public virtual void ReadExternal(IPofReader reader)
Parameters
Type Name Description
IPofReader reader

The IPofReader from which to read the object's state.

Exceptions
Type Condition
IOException

If an I/O error occurs.

ToString()

Return a human-readable description for this CompositeAggregator.

Declaration
public override string ToString()
Returns
Type Description
string

A string description of the CompositeAggregator.

Overrides
object.ToString()

WriteExternal(IPofWriter)

Save the contents of a POF user type instance by writing its state using the specified IPofWriter object.

Declaration
public virtual void WriteExternal(IPofWriter writer)
Parameters
Type Name Description
IPofWriter writer

The IPofWriter to which to write the object's state.

Exceptions
Type Condition
IOException

If an I/O error occurs.

Implements

IEntryAggregator
IPortableObject
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.