Aggregators ClassHazelcast .Net Client Class Library
Inheritance Hierarchy

SystemObject
  Hazelcast.CoreAggregators

Namespace: Hazelcast.Core
Assembly: Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.9
Syntax

public static class Aggregators
Methods

  NameDescription
Public methodStatic memberBigIntegerSum
An aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only BigInteger input values.
Public methodStatic memberBigIntegerSum(String)
an aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only BigInteger input values.
Public methodStatic memberCount
an aggregator that counts the input values. Accepts nulls as input values.
Public methodStatic memberCount(String)
an aggregator that counts the input values extracted from the given attributePath. Accepts null input values and null extracted values.
Public methodStatic memberDoubleAvg
an aggregator that calculates the average of the input values. Does NOT accept null input values.
Public methodStatic memberDoubleAvg(String)
an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only double input values
Public methodStatic memberDoubleSum
an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only double input values.
Public methodStatic memberDoubleSum(String)
An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only double input values.
Public methodStatic memberFixedPointSum
an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts float or double input values.
Public methodStatic memberFixedPointSum(String)
An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts float or double input values.
Public methodStatic memberFloatingPointSum
an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts float or double input values.
Public methodStatic memberFloatingPointSum(String)
An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts float or double input values.
Public methodStatic memberIntegerAvg
an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts only int input values
Public methodStatic memberIntegerAvg(String)
an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only int input values
Public methodStatic memberIntegerSum
an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only int input values.
Public methodStatic memberIntegerSum(String)
An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only int input values.
Public methodStatic memberLongAvg
an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts only long input values
Public methodStatic memberLongAvg(String)
an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only long input values
Public methodStatic memberLongSum
an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only long input values.
Public methodStatic memberLongSum(String)
An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only long input values.
Public methodStatic memberMaxTResult
an aggregator that calculates the max of the input values. Accepts null input values
Public methodStatic memberMaxTResult(String)
an aggregator that calculates the max of the input values extracted from the given attributePath. Accepts null input values and null extracted values.
Public methodStatic memberMinTResult
an aggregator that calculates the min of the input values. Accepts null input values
Public methodStatic memberMinTResult(String)
an aggregator that calculates the min of the input values extracted from the given attributePath. Accepts null input values and null extracted values.
Public methodStatic memberNumberAvg
an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts float or double input values.
Public methodStatic memberNumberAvg(String)
an aggregator that calculates the average of the input values. Does NOT accept null input values nor null extracted values. Accepts float or double input values.
Top
Remarks

Min/Max/Average aggregators are type specific, so an IntegerAvg() aggregator expects all elements to be integers. There is no conversion executed while accumulating, so if there is any other type met an exception will be thrown.
In order to operate on a generic Number type use the FixedPointSum(String), FloatingPointSum(String) and NumberAvg(String) aggregators. All of them will convert the given number to either Long or Double during the accumulation phase. It will result in a lot of allocations since each number has to be converted, but it enables the user to operate on the whole family of numbers. It is especially useful if the numbers given to the aggregators may not be of one type only.
The attributePath given in the factory method allows the aggregator to operate on the value extracted by navigating to the given attributePath on each object that has been returned from a query. The attribute path may be simple, e.g. "name", or nested "address.city".
If an aggregator does not accept null values pass a predicate to the aggregate call that will filter them out.
If the input value or the extracted value is a collection it won't be "unfolded" - so for example count aggregation on "person.postalCodes" will return 1 for each input object and not the size of the collection. In order to calculate the size of the collection use the [any] operator, e.g. "person.postalCodes[any]".
See Also

Reference