com.hazelcast.mapreduce.aggregation
Class Aggregations

java.lang.Object
  extended by com.hazelcast.mapreduce.aggregation.Aggregations

@Beta
public final class Aggregations
extends Object

This class is used to access the Hazelcast predefined set of aggregations in a type-safe way.

Since:
3.3

Method Summary
static
<Key,Value>
Aggregation<Key,BigDecimal,BigDecimal>
bigDecimalAvg()
          Returns an aggregation to calculate the BigDecimal average of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,BigDecimal,BigDecimal>
bigDecimalMax()
          Returns an aggregation to find the BigDecimal maximum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,BigDecimal,BigDecimal>
bigDecimalMin()
          Returns an aggregation to find the BigDecimal minimum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,BigDecimal,BigDecimal>
bigDecimalSum()
          Returns an aggregation to calculate the BigDecimal sum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,BigInteger,BigInteger>
bigIntegerAvg()
          Returns an aggregation to calculate the BigInteger average of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,BigInteger,BigInteger>
bigIntegerMax()
          Returns an aggregation to find the BigInteger maximum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,BigInteger,BigInteger>
bigIntegerMin()
          Returns an aggregation to find the BigInteger minimum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,BigInteger,BigInteger>
bigIntegerSum()
          Returns an aggregation to calculate the BigInteger sum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Comparable,Comparable>
comparableMax()
          Returns an aggregation to find the maximum value of all supplied Comparable implementing values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Comparable,Comparable>
comparableMin()
          Returns an aggregation to find the minimum value of all supplied Comparable implementing values.
This aggregation is similar to
static
<Key> Aggregation<Key,Object,Long>
count()
          Returns an aggregation for counting all supplied values.
This aggregation is similar to
static
<Key,Value,DistinctType>
Aggregation<Key,Value,Set<DistinctType>>
distinctValues()
          Returns an aggregation for selecting all distinct values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Double,Double>
doubleAvg()
          Returns an aggregation to calculate the double average of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Double,Double>
doubleMax()
          Returns an aggregation to find the double maximum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Double,Double>
doubleMin()
          Returns an aggregation to find the double minimum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Double,Double>
doubleSum()
          Returns an aggregation to calculate the double sum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Value,Integer>
integerAvg()
          Returns an aggregation to calculate the integer average of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Integer,Integer>
integerMax()
          Returns an aggregation to find the integer maximum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Integer,Integer>
integerMin()
          Returns an aggregation to find the integer minimum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Integer,Integer>
integerSum()
          Returns an aggregation to calculate the integer sum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Long,Long>
longAvg()
          Returns an aggregation to calculate the long average of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Long,Long>
longMax()
          Returns an aggregation to find the long maximum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Long,Long>
longMin()
          Returns an aggregation to find the long minimum of all supplied values.
This aggregation is similar to
static
<Key,Value>
Aggregation<Key,Long,Long>
longSum()
          Returns an aggregation to calculate the long sum of all supplied values.
This aggregation is similar to
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

count

public static <Key> Aggregation<Key,Object,Long> count()
Returns an aggregation for counting all supplied values.
This aggregation is similar to
SELECT COUNT(*) FROM x

Type Parameters:
Key - the input key type
Returns:
the count of all supplied elements

distinctValues

public static <Key,Value,DistinctType> Aggregation<Key,Value,Set<DistinctType>> distinctValues()
Returns an aggregation for selecting all distinct values.
This aggregation is similar to
SELECT DISTINCT * FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
DistinctType - the type of all distinct values
Returns:
a Set containing all distinct values

integerAvg

public static <Key,Value> Aggregation<Key,Value,Integer> integerAvg()
Returns an aggregation to calculate the integer average of all supplied values.
This aggregation is similar to
SELECT AVG(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the average over all supplied values

integerSum

public static <Key,Value> Aggregation<Key,Integer,Integer> integerSum()
Returns an aggregation to calculate the integer sum of all supplied values.
This aggregation is similar to
SELECT SUM(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the sum over all supplied values

integerMin

public static <Key,Value> Aggregation<Key,Integer,Integer> integerMin()
Returns an aggregation to find the integer minimum of all supplied values.
This aggregation is similar to
SELECT MIN(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the minimum value over all supplied values

integerMax

public static <Key,Value> Aggregation<Key,Integer,Integer> integerMax()
Returns an aggregation to find the integer maximum of all supplied values.
This aggregation is similar to
SELECT MAX(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the maximum value over all supplied values

longAvg

public static <Key,Value> Aggregation<Key,Long,Long> longAvg()
Returns an aggregation to calculate the long average of all supplied values.
This aggregation is similar to
SELECT AVG(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the average over all supplied values

longSum

public static <Key,Value> Aggregation<Key,Long,Long> longSum()
Returns an aggregation to calculate the long sum of all supplied values.
This aggregation is similar to
SELECT SUM(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the sum over all supplied values

longMin

public static <Key,Value> Aggregation<Key,Long,Long> longMin()
Returns an aggregation to find the long minimum of all supplied values.
This aggregation is similar to
SELECT MIN(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the minimum value over all supplied values

longMax

public static <Key,Value> Aggregation<Key,Long,Long> longMax()
Returns an aggregation to find the long maximum of all supplied values.
This aggregation is similar to
SELECT MAX(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the maximum value over all supplied values

doubleAvg

public static <Key,Value> Aggregation<Key,Double,Double> doubleAvg()
Returns an aggregation to calculate the double average of all supplied values.
This aggregation is similar to
SELECT AVG(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the average over all supplied values

doubleSum

public static <Key,Value> Aggregation<Key,Double,Double> doubleSum()
Returns an aggregation to calculate the double sum of all supplied values.
This aggregation is similar to
SELECT SUM(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the sum over all supplied values

doubleMin

public static <Key,Value> Aggregation<Key,Double,Double> doubleMin()
Returns an aggregation to find the double minimum of all supplied values.
This aggregation is similar to
SELECT MIN(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the minimum value over all supplied values

doubleMax

public static <Key,Value> Aggregation<Key,Double,Double> doubleMax()
Returns an aggregation to find the double maximum of all supplied values.
This aggregation is similar to
SELECT MAX(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the maximum value over all supplied values

bigDecimalAvg

public static <Key,Value> Aggregation<Key,BigDecimal,BigDecimal> bigDecimalAvg()
Returns an aggregation to calculate the BigDecimal average of all supplied values.
This aggregation is similar to
SELECT AVG(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the average over all supplied values

bigDecimalSum

public static <Key,Value> Aggregation<Key,BigDecimal,BigDecimal> bigDecimalSum()
Returns an aggregation to calculate the BigDecimal sum of all supplied values.
This aggregation is similar to
SELECT SUM(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the sum over all supplied values

bigDecimalMin

public static <Key,Value> Aggregation<Key,BigDecimal,BigDecimal> bigDecimalMin()
Returns an aggregation to find the BigDecimal minimum of all supplied values.
This aggregation is similar to
SELECT MIN(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the minimum value over all supplied values

bigDecimalMax

public static <Key,Value> Aggregation<Key,BigDecimal,BigDecimal> bigDecimalMax()
Returns an aggregation to find the BigDecimal maximum of all supplied values.
This aggregation is similar to
SELECT MAX(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the maximum value over all supplied values

bigIntegerAvg

public static <Key,Value> Aggregation<Key,BigInteger,BigInteger> bigIntegerAvg()
Returns an aggregation to calculate the BigInteger average of all supplied values.
This aggregation is similar to
SELECT AVG(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the average over all supplied values

bigIntegerSum

public static <Key,Value> Aggregation<Key,BigInteger,BigInteger> bigIntegerSum()
Returns an aggregation to calculate the BigInteger sum of all supplied values.
This aggregation is similar to
SELECT SUM(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the sum over all supplied values

bigIntegerMin

public static <Key,Value> Aggregation<Key,BigInteger,BigInteger> bigIntegerMin()
Returns an aggregation to find the BigInteger minimum of all supplied values.
This aggregation is similar to
SELECT MIN(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the minimum value over all supplied values

bigIntegerMax

public static <Key,Value> Aggregation<Key,BigInteger,BigInteger> bigIntegerMax()
Returns an aggregation to find the BigInteger maximum of all supplied values.
This aggregation is similar to
SELECT MAX(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the maximum value over all supplied values

comparableMin

public static <Key,Value> Aggregation<Key,Comparable,Comparable> comparableMin()
Returns an aggregation to find the minimum value of all supplied Comparable implementing values.
This aggregation is similar to
SELECT MIN(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the minimum value over all supplied values

comparableMax

public static <Key,Value> Aggregation<Key,Comparable,Comparable> comparableMax()
Returns an aggregation to find the maximum value of all supplied Comparable implementing values.
This aggregation is similar to
SELECT MAX(value) FROM x

Type Parameters:
Key - the input key type
Value - the supplied value type
Returns:
the maximum value over all supplied values


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.