Abstract aggregator that processes values extracted from a set of entries in a Map, with knowledge of how to compare those values. There are two way to use the AbstractComparableAggregator:

  • All the extracted objects must implement the Java Comparable interface, or
  • The AbstractComparableAggregator has to be provided with a Comparator object.
  • This Comparator must exist on the server in order to be usable.
If there are no entries to aggregate, the returned result will be `null`.

Type Parameters

  • R

    the type of the aggregation result

Hierarchy

Constructors

Properties

Methods

Constructors

  • Construct an AbstractComparableAggregator that will aggregate Java-Comparable values extracted from the cache entries.

    Type Parameters

    • R

    Parameters

    • clz: string

      the server-side EntryAggregator implementation type identifier

    • extractorOrProperty: string | ValueExtractor

      the extractor that provides values to aggregate or the name of the method that could be invoked via Java reflection and that returns values to aggregate; this parameter can also be a dot-delimited sequence of method names which would result in an aggregator based on the ChainedExtractor that is based on an array of corresponding UniversalExtractor objects

    Returns AbstractComparableAggregator<R>

Properties

@class: string

Server-side EntryAggregator implementation type identifier.

extractor?: ValueExtractor

The ValueExtractor to apply when aggregating results.

Methods