Class ComparableMax
Calculates a maximum among values extracted from a set of entries in a cache.
Inherited Members
Namespace: Tangosol.Util.Aggregator
Assembly: Coherence.dll
Syntax
public class ComparableMax : AbstractComparableAggregator, IParallelAwareAggregator, IEntryAggregator, IPortableObject
Remarks
This aggregator is most commonly used with objects that implement IComparable such as String or DateTime. An IComparer can also be supplied to perform the comparisons.
Constructors
ComparableMax()
Default constructor.
Declaration
public ComparableMax()
ComparableMax(string)
Construct a ComparableMax aggregator.
Declaration
public ComparableMax(string member)
Parameters
Type | Name | Description |
---|---|---|
string | member | The name of the member that returns a value in the form of any object that implements IComparable interface. |
ComparableMax(IValueExtractor)
Construct a ComparableMax aggregator.
Declaration
public ComparableMax(IValueExtractor extractor)
Parameters
Type | Name | Description |
---|---|---|
IValueExtractor | extractor | The extractor that provides a value in the form of any object that implements IComparable interface. |
ComparableMax(IValueExtractor, IComparer)
Construct a ComparableMax aggregator.
Declaration
public ComparableMax(IValueExtractor extractor, IComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
IValueExtractor | extractor | The extractor that provides an object to be compared. |
IComparer | comparer | The comparer used to compare the extracted object. |
Methods
Process(object, bool)
Incorporate one aggregatable value into the result.
Declaration
protected override void Process(object o, bool isFinal)
Parameters
Type | Name | Description |
---|---|---|
object | o | The value to incorporate into the aggregated result. |
bool | isFinal | true to indicate that the given object is a partial result returned by a parallel aggregator. |
Overrides
Remarks
If the isFinal
parameter is true, the
given object is a partial result (returned by an individual
parallel aggregator) that should be incorporated into the final
result; otherwise, the object is a value extracted from an
IInvocableCacheEntry.