Package com.tangosol.util
Class Aggregators
- java.lang.Object
-
- com.tangosol.util.Aggregators
-
public class Aggregators extends Object
Simple Aggregator DSL.The methods in this class are for the most part simple factory methods for various
InvocableMap.EntryAggregator
classes, but in some cases provide additional type safety. They also tend to make the code more readable, especially if imported statically, so their use is strongly encouraged in lieu of direct construction ofInvocableMap.EntryAggregator
classes.- Author:
- lh, hr 2018.06.12
-
-
Constructor Summary
Constructors Constructor Description Aggregators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V,P,R>
AsynchronousAggregator<K,V,P,R>asynchronous(InvocableMap.StreamingAggregator<K,V,P,R> aggregator)
Return an AsynchronousAggregator for a given streaming aggregator.static <K,V,P,R>
InvocableMap.EntryAggregator<K,V,R>asynchronous(InvocableMap.StreamingAggregator<K,V,P,R> aggregator, int iUnitOrderId)
Return an AsynchronousAggregator for a given streaming aggregator.static <K,V,P,R>
InvocableMap.EntryAggregator<K,V,R>asynchronous(InvocableMap.StreamingAggregator<K,V,P,R> aggregator, int iUnitOrderId, Executor executor)
Return an AsynchronousAggregator for a given streaming aggregator.static <K,V,P,R>
AsynchronousAggregator<K,V,P,R>asynchronous(InvocableMap.StreamingAggregator<K,V,P,R> aggregator, Executor executor)
Return an AsynchronousAggregator for a given streaming aggregator.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>average(Remote.ToBigDecimalFunction<? super T> extractor)
Return an aggregator that calculates an average of the BigDecimal values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>average(Remote.ToDoubleFunction<? super T> extractor)
Return an aggregator that calculates an average of the double values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>average(Remote.ToIntFunction<? super T> extractor)
Return an aggregator that calculates an average of the int values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>average(Remote.ToLongFunction<? super T> extractor)
Return an aggregator that calculates an average of the long values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>average(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,Double>average(String sMethod)
Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>bigDecimalAverage(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>bigDecimalAverage(String sMethod)
Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>bigDecimalMax(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>bigDecimalMax(String sMethod)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>bigDecimalMin(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>bigDecimalMin(String sMethod)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>bigDecimalSum(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>bigDecimalSum(String sMethod)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>comparableMax(ValueExtractor<? super T,? extends R> extractor)
Return an aggregator that calculates a maximum of theComparable
values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>comparableMax(ValueExtractor<? super T,? extends R> extractor, Comparator<? super R> comparator)
Return an aggregator that calculates a maximum of the values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>comparableMax(String sMethod)
Return an aggregator that calculates a maximum of theComparable
values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>comparableMax(String sMethod, Comparator<? super R> comparator)
Return an aggregator that calculates a maximum of the values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>comparableMin(ValueExtractor<? super T,? extends R> extractor)
Return an aggregator that calculates a minimum of theComparable
values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>comparableMin(ValueExtractor<? super T,? extends R> extractor, Comparator<? super R> comparator)
Return an aggregator that calculates a minimum of the values extracted from a set of entries in a Map.static <K,V,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>comparableMin(String sMethod)
Return an aggregator that calculates a minimum of theComparable
values extracted from a set of entries in a Map.static <K,V,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>comparableMin(String sMethod, Comparator<? super R> comparator)
Return an aggregator that calculates a minimum of the values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,List<?>>composite(InvocableMap.EntryAggregator... aAggregator)
Return an aggregator that calculates the the combined set of results from a number of aggregators.static <K,V>
InvocableMap.StreamingAggregator<K,V,Integer,Integer>count()
Return an aggregator that calculates the count of the entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,Collection<V>>distinctValues()
Return an aggregator that calculates the set of distinct values from the entries in a Map.static <K,V,T,R>
InvocableMap.StreamingAggregator<K,V,?,Collection<R>>distinctValues(ValueExtractor<? super T,? extends R> extractor)
Return an aggregator that calculates the set of distinct values extracted from the entries in a Map.static <K,V,R>
InvocableMap.StreamingAggregator<K,V,?,Collection<R>>distinctValues(String sMethod)
Return an aggregator that calculates the set of distinct values extracted from the entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>doubleMax(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,Double>doubleMax(String sMethod)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>doubleMin(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,Double>doubleMin(String sMethod)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>doubleSum(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,Double>doubleSum(String sMethod)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map.static <K,V,E,R>
InvocableMap.StreamingAggregator<K,V,Map<E,Object>,Map<E,R>>grouping(InvocableMap.EntryAggregator<K,V,R> aggregator, Filter filter, String... asNames)
Create an instance of group aggregator based on a specified property or method name(s) and anInvocableMap.EntryAggregator
.static <K,V,E,R>
InvocableMap.StreamingAggregator<K,V,Map<E,Object>,Map<E,R>>grouping(InvocableMap.EntryAggregator<K,V,R> aggregator, String... asNames)
Create an instance of group aggregator based on a specified property or method name(s) and anInvocableMap.EntryAggregator
.static <K,V,T,E,R>
InvocableMap.StreamingAggregator<K,V,Map<E,Object>,Map<E,R>>grouping(ValueExtractor<? super T,? extends E> extractor, InvocableMap.EntryAggregator<? super K,? super V,R> aggregator, Filter filter)
Create an instance of group aggregator based on a specified property or method name(s) and anInvocableMap.EntryAggregator
.static <K,V,T,E,R>
InvocableMap.StreamingAggregator<K,V,Map<E,Object>,Map<E,R>>grouping(ValueExtractor<? super T,? extends E> extractor, InvocableMap.EntryAggregator<K,V,R> aggregator)
Create an instance of group aggregator based on a specified property or method name(s) and anInvocableMap.EntryAggregator
.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Long>longMax(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,Long>longMax(String sMethod)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Long>longMin(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,Long>longMin(String sMethod)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Long>longSum(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map.static <K,V>
InvocableMap.StreamingAggregator<K,V,?,Long>longSum(String sMethod)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>max(Remote.ToBigDecimalFunction<? super T> extractor)
Return an aggregator that calculates a maximum of the BigDecimal values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>max(Remote.ToComparableFunction<? super T,? extends R> extractor)
Return an aggregator that calculates a maximum of the Comparable values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>max(Remote.ToDoubleFunction<? super T> extractor)
Return an aggregator that calculates a maximum of the double values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Long>max(Remote.ToIntFunction<? super T> extractor)
Return an aggregator that calculates a maximum of the int values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Long>max(Remote.ToLongFunction<? super T> extractor)
Return an aggregator that calculates a maximum of the long values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>min(Remote.ToBigDecimalFunction<? super T> extractor)
Return an aggregator that calculates a minimum of the BigDecimal values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R>min(Remote.ToComparableFunction<? super T,? extends R> extractor)
Return an aggregator that calculates a minimum of the Comparable values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>min(Remote.ToDoubleFunction<? super T> extractor)
Return an aggregator that calculates a minimum of the double values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Long>min(Remote.ToIntFunction<? super T> extractor)
Return an aggregator that calculates a minimum of the int values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Long>min(Remote.ToLongFunction<? super T> extractor)
Return an aggregator that calculates a minimum of the long values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,Map<K,R>>reduce(ValueExtractor<? super T,? extends R> extractor)
Return an aggregator that will return the extracted value for each entry in the map.static <K,V,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,Map<K,R>>reduce(String sMethod)
Return an aggregator that will return the extracted value for each entry in the map.static <K,V,P,R>
InvocableMap.StreamingAggregator<K,V,P,R>script(String sLanguage, String sName, int characteristics, Object... aoArgs)
Return an aggregator that is implemented in a script using the specified language.static <K,V,P,R>
InvocableMap.StreamingAggregator<K,V,P,R>script(String sLanguage, String sName, Object... aoArgs)
Return an aggregator that is implemented in a script using the specified language.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,BigDecimal>sum(Remote.ToBigDecimalFunction<? super T> extractor)
Return an aggregator that calculates a sum of the BigDecimal values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Double>sum(Remote.ToDoubleFunction<? super T> extractor)
Return an aggregator that calculates a sum of the double values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Long>sum(Remote.ToIntFunction<? super T> extractor)
Return an aggregator that calculates a sum of the int values extracted from a set of entries in a Map.static <K,V,T>
InvocableMap.StreamingAggregator<K,V,?,Long>sum(Remote.ToLongFunction<? super T> extractor)
Return an aggregator that calculates a sum of the long values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R[]>topN(ValueExtractor<? super T,? extends R> extractor, int cResults)
Return an aggregator that calculates the top n of theComparable
values extracted from a set of entries in a Map.static <K,V,T,R>
InvocableMap.StreamingAggregator<K,V,?,R[]>topN(ValueExtractor<? super T,? extends R> extractor, Comparator<? super R> comparator, int cResults)
Return an aggregator that calculates the top n of the values extracted from a set of entries in a Map.static <K,V,T,R extends Comparable<? super R>>
InvocableMap.StreamingAggregator<K,V,?,R[]>topN(String sMethod, int cResults)
Return an aggregator that calculates the top n of theComparable
values extracted from a set of entries in a Map.static <K,V,T,R>
InvocableMap.StreamingAggregator<K,V,?,R[]>topN(String sMethod, Comparator<? super R> comparator, int cResults)
Return an aggregator that calculates the top n of the values extracted from a set of entries in a Map.
-
-
-
Method Detail
-
asynchronous
public static <K,V,P,R> AsynchronousAggregator<K,V,P,R> asynchronous(InvocableMap.StreamingAggregator<K,V,P,R> aggregator)
Return an AsynchronousAggregator for a given streaming aggregator.- Type Parameters:
K
- the type of the Map entry keysV
- the type of the Map entry valuesP
- the type of the intermediate result during the parallel stageR
- the type of the value returned by the StreamingAggregator- Parameters:
aggregator
- the underlying streaming aggregator
-
asynchronous
public static <K,V,P,R> AsynchronousAggregator<K,V,P,R> asynchronous(InvocableMap.StreamingAggregator<K,V,P,R> aggregator, Executor executor)
Return an AsynchronousAggregator for a given streaming aggregator.- Type Parameters:
K
- the type of the Map entry keysV
- the type of the Map entry valuesP
- the type of the intermediate result during the parallel stageR
- the type of the value returned by the StreamingAggregator- Parameters:
aggregator
- the underlying streaming aggregatorexecutor
- an optionalExecutor
to complete the future on, if not provided theDaemons.commonPool()
is used
-
asynchronous
public static <K,V,P,R> InvocableMap.EntryAggregator<K,V,R> asynchronous(InvocableMap.StreamingAggregator<K,V,P,R> aggregator, int iUnitOrderId)
Return an AsynchronousAggregator for a given streaming aggregator.- Parameters:
aggregator
- the underlying streaming aggregatoriUnitOrderId
- the unit-of-order id for this aggregator
-
asynchronous
public static <K,V,P,R> InvocableMap.EntryAggregator<K,V,R> asynchronous(InvocableMap.StreamingAggregator<K,V,P,R> aggregator, int iUnitOrderId, Executor executor)
Return an AsynchronousAggregator for a given streaming aggregator.- Parameters:
aggregator
- the underlying streaming aggregatoriUnitOrderId
- the unit-of-order id for this aggregatorexecutor
- an optionalExecutor
to complete the future on, if not provided theDaemons.commonPool()
is used
-
average
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> average(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
average
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,Double> average(String sMethod)
Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
max
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> max(Remote.ToDoubleFunction<? super T> extractor)
Return an aggregator that calculates a maximum of the double values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aDouble
-
min
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> min(Remote.ToDoubleFunction<? super T> extractor)
Return an aggregator that calculates a minimum of the double values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aDouble
-
sum
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> sum(Remote.ToDoubleFunction<? super T> extractor)
Return an aggregator that calculates a sum of the double values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aDouble
-
average
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> average(Remote.ToDoubleFunction<? super T> extractor)
Return an aggregator that calculates an average of the double values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aDouble
-
doubleMax
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> doubleMax(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
doubleMax
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,Double> doubleMax(String sMethod)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
doubleMin
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> doubleMin(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
doubleMin
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,Double> doubleMin(String sMethod)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
doubleSum
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> doubleSum(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
doubleSum
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,Double> doubleSum(String sMethod)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java double values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
max
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Long> max(Remote.ToIntFunction<? super T> extractor)
Return an aggregator that calculates a maximum of the int values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is anInteger
-
min
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Long> min(Remote.ToIntFunction<? super T> extractor)
Return an aggregator that calculates a minimum of the int values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is anInteger
-
sum
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Long> sum(Remote.ToIntFunction<? super T> extractor)
Return an aggregator that calculates a sum of the int values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is anInteger
-
average
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> average(Remote.ToIntFunction<? super T> extractor)
Return an aggregator that calculates an average of the int values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is anInteger
-
max
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Long> max(Remote.ToLongFunction<? super T> extractor)
Return an aggregator that calculates a maximum of the long values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aLong
-
min
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Long> min(Remote.ToLongFunction<? super T> extractor)
Return an aggregator that calculates a minimum of the long values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aLong
-
sum
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Long> sum(Remote.ToLongFunction<? super T> extractor)
Return an aggregator that calculates a sum of the long values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aLong
-
average
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Double> average(Remote.ToLongFunction<? super T> extractor)
Return an aggregator that calculates an average of the long values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aLong
-
longMax
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Long> longMax(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
longMax
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,Long> longMax(String sMethod)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
longMin
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Long> longMin(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
longMin
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,Long> longMin(String sMethod)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
longSum
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,Long> longSum(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
longSum
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,Long> longSum(String sMethod)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated as Java long values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
max
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> max(Remote.ToBigDecimalFunction<? super T> extractor)
Return an aggregator that calculates a maximum of the BigDecimal values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is anBigDecimal
-
min
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> min(Remote.ToBigDecimalFunction<? super T> extractor)
Return an aggregator that calculates a minimum of the BigDecimal values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is anBigDecimal
-
sum
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> sum(Remote.ToBigDecimalFunction<? super T> extractor)
Return an aggregator that calculates a sum of the BigDecimal values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is anBigDecimal
-
average
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> average(Remote.ToBigDecimalFunction<? super T> extractor)
Return an aggregator that calculates an average of the BigDecimal values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is anBigDecimal
-
bigDecimalAverage
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> bigDecimalAverage(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated asBigDecimal
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
bigDecimalAverage
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> bigDecimalAverage(String sMethod)
Return an aggregator that calculates a average of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated asBigDecimal
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
bigDecimalMax
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> bigDecimalMax(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated asBigDecimal
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
bigDecimalMax
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> bigDecimalMax(String sMethod)
Return an aggregator that calculates a maximum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated asBigDecimal
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
bigDecimalMin
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> bigDecimalMin(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated asBigDecimal
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
bigDecimalMin
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> bigDecimalMin(String sMethod)
Return an aggregator that calculates a minimum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated asBigDecimal
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
bigDecimalSum
public static <K,V,T> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> bigDecimalSum(ValueExtractor<? super T,? extends Number> extractor)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated asBigDecimal
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aNumber
-
bigDecimalSum
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,BigDecimal> bigDecimalSum(String sMethod)
Return an aggregator that calculates a sum of the numeric values extracted from a set of entries in a Map. All the extracted Number objects will be treated asBigDecimal
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object that is aNumber
-
max
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> max(Remote.ToComparableFunction<? super T,? extends R> extractor)
Return an aggregator that calculates a maximum of the Comparable values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aComparable
-
min
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> min(Remote.ToComparableFunction<? super T,? extends R> extractor)
Return an aggregator that calculates a minimum of the Comparable values extracted from a set of entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract from- Parameters:
extractor
- the extractor that provides a value in the form of any Java object that is aComparable
-
comparableMax
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> comparableMax(ValueExtractor<? super T,? extends R> extractor)
Return an aggregator that calculates a maximum of theComparable
values extracted from a set of entries in a Map. All the extracted objects will be treated asComparable
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
extractor
- the extractor that provides a value in the form of any object that implementsComparable
interface
-
comparableMax
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> comparableMax(ValueExtractor<? super T,? extends R> extractor, Comparator<? super R> comparator)
Return an aggregator that calculates a maximum of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specifiedComparator
.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
extractor
- the extractor that provides an object to be comparedcomparator
- the comparator used to compare the extracted object
-
comparableMax
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> comparableMax(String sMethod)
Return an aggregator that calculates a maximum of theComparable
values extracted from a set of entries in a Map. All the extracted objects will be treated asComparable
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
sMethod
- the name of the method that returns a value in the form of any object that implementsComparable
interface
-
comparableMax
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> comparableMax(String sMethod, Comparator<? super R> comparator)
Return an aggregator that calculates a maximum of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specifiedComparator
.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
sMethod
- the name of the method that returns the value to be comparedcomparator
- the comparator used to compare the extracted object
-
comparableMin
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> comparableMin(ValueExtractor<? super T,? extends R> extractor)
Return an aggregator that calculates a minimum of theComparable
values extracted from a set of entries in a Map. All the extracted objects will be treated asComparable
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
extractor
- the extractor that provides a value in the form of any object that implementsComparable
interface
-
comparableMin
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> comparableMin(ValueExtractor<? super T,? extends R> extractor, Comparator<? super R> comparator)
Return an aggregator that calculates a minimum of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specifiedComparator
.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
extractor
- the extractor that provides an object to be comparedcomparator
- the comparator used to compare the extracted object
-
comparableMin
public static <K,V,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> comparableMin(String sMethod)
Return an aggregator that calculates a minimum of theComparable
values extracted from a set of entries in a Map. All the extracted objects will be treated asComparable
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueR
- the type of the aggregation result- Parameters:
sMethod
- the name of the method that returns a value in the form of any object that implementsComparable
interface
-
comparableMin
public static <K,V,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R> comparableMin(String sMethod, Comparator<? super R> comparator)
Return an aggregator that calculates a minimum of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specifiedComparator
.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueR
- the type of the aggregation result- Parameters:
sMethod
- the name of the method that returns a value in the form of any object that implementsComparable
interface
-
count
public static <K,V> InvocableMap.StreamingAggregator<K,V,Integer,Integer> count()
Return an aggregator that calculates the count of the entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value
-
distinctValues
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,Collection<V>> distinctValues()
Return an aggregator that calculates the set of distinct values from the entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value
-
distinctValues
public static <K,V,T,R> InvocableMap.StreamingAggregator<K,V,?,Collection<R>> distinctValues(ValueExtractor<? super T,? extends R> extractor)
Return an aggregator that calculates the set of distinct values extracted from the entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
extractor
- the extractor that provides a value in the form of any Java object
-
distinctValues
public static <K,V,R> InvocableMap.StreamingAggregator<K,V,?,Collection<R>> distinctValues(String sMethod)
Return an aggregator that calculates the set of distinct values extracted from the entries in a Map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueR
- the type of the aggregation result- Parameters:
sMethod
- the name of the method that returns a value in the form of any Java object
-
composite
public static <K,V> InvocableMap.StreamingAggregator<K,V,?,List<?>> composite(InvocableMap.EntryAggregator... aAggregator)
Return an aggregator that calculates the the combined set of results from a number of aggregators.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's value- Parameters:
aAggregator
- an array of EntryAggregator objects; may not be null- Throws:
NullPointerException
- if the aggregator array is null
-
grouping
public static <K,V,E,R> InvocableMap.StreamingAggregator<K,V,Map<E,Object>,Map<E,R>> grouping(InvocableMap.EntryAggregator<K,V,R> aggregator, String... asNames)
Create an instance of group aggregator based on a specified property or method name(s) and anInvocableMap.EntryAggregator
.- Type Parameters:
K
- the type of the Map entry keysV
- the type of the Map entry valuesE
- the type of the extracted valueR
- the type of the group aggregator result- Parameters:
aggregator
- an underlying EntryAggregatorasNames
- the property or method name(s) to extract values from. The resultingValueExtractor
is used to split InvocableMap entries into distinct groups.
-
grouping
public static <K,V,E,R> InvocableMap.StreamingAggregator<K,V,Map<E,Object>,Map<E,R>> grouping(InvocableMap.EntryAggregator<K,V,R> aggregator, Filter filter, String... asNames)
Create an instance of group aggregator based on a specified property or method name(s) and anInvocableMap.EntryAggregator
.- Type Parameters:
K
- the type of the Map entry keysV
- the type of the Map entry valuesE
- the type of the extracted valueR
- the type of the group aggregator result- Parameters:
aggregator
- an underlying EntryAggregatorfilter
- an optional Filter object that will be used to evaluate results of each individual group aggregationasNames
- the property or method name(s) to extract values from. The resultingValueExtractor
is used to split InvocableMap entries into distinct groups.
-
grouping
public static <K,V,T,E,R> InvocableMap.StreamingAggregator<K,V,Map<E,Object>,Map<E,R>> grouping(ValueExtractor<? super T,? extends E> extractor, InvocableMap.EntryAggregator<K,V,R> aggregator)
Create an instance of group aggregator based on a specified property or method name(s) and anInvocableMap.EntryAggregator
.- Type Parameters:
K
- the type of the Map entry keysV
- the type of the Map entry valuesT
- the type of the value to extract fromE
- the type of the extracted valueR
- the type of the group aggregator result- Parameters:
extractor
- a ValueExtractor that will be used to split a set of InvocableMap entries into distinct groupsaggregator
- an underlying EntryAggregator
-
grouping
public static <K,V,T,E,R> InvocableMap.StreamingAggregator<K,V,Map<E,Object>,Map<E,R>> grouping(ValueExtractor<? super T,? extends E> extractor, InvocableMap.EntryAggregator<? super K,? super V,R> aggregator, Filter filter)
Create an instance of group aggregator based on a specified property or method name(s) and anInvocableMap.EntryAggregator
.- Type Parameters:
K
- the type of the Map entry keysV
- the type of the Map entry valuesT
- the type of the value to extract fromE
- the type of the extracted valueR
- the type of the group aggregator result- Parameters:
extractor
- a ValueExtractor that will be used to split a set of InvocableMap entries into distinct groupsaggregator
- an underlying EntryAggregatorfilter
- an optional Filter object used to filter out results of individual group aggregation results
-
topN
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R[]> topN(ValueExtractor<? super T,? extends R> extractor, int cResults)
Return an aggregator that calculates the top n of theComparable
values extracted from a set of entries in a Map. All the extracted objects will be treated asComparable
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
extractor
- the extractor that provides a value in the form of any object that implementsComparable
interfacecResults
- the maximum number of results to return
-
topN
public static <K,V,T,R> InvocableMap.StreamingAggregator<K,V,?,R[]> topN(ValueExtractor<? super T,? extends R> extractor, Comparator<? super R> comparator, int cResults)
Return an aggregator that calculates the top n of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specifiedComparator
.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
extractor
- the extractor that provides an object to be comparedcomparator
- the comparator used to compare the extracted objectcResults
- the maximum number of results to return
-
topN
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,R[]> topN(String sMethod, int cResults)
Return an aggregator that calculates the top n of theComparable
values extracted from a set of entries in a Map. All the extracted objects will be treated asComparable
values.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
sMethod
- the name of the method that returns a value in the form of any object that implementsComparable
interfacecResults
- the maximum number of results to return
-
topN
public static <K,V,T,R> InvocableMap.StreamingAggregator<K,V,?,R[]> topN(String sMethod, Comparator<? super R> comparator, int cResults)
Return an aggregator that calculates the top n of the values extracted from a set of entries in a Map. All the extracted objects will ordered using the specifiedComparator
.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
sMethod
- the name of the method that returns the value to be comparedcomparator
- the comparator used to compare the extracted objectcResults
- the maximum number of results to return
-
reduce
public static <K,V,T,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,Map<K,R>> reduce(ValueExtractor<? super T,? extends R> extractor)
Return an aggregator that will return the extracted value for each entry in the map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueT
- the type of the value to extract fromR
- the type of the aggregation result- Parameters:
extractor
- the extractor that provides an value(s) to be returned
-
reduce
public static <K,V,R extends Comparable<? super R>> InvocableMap.StreamingAggregator<K,V,?,Map<K,R>> reduce(String sMethod)
Return an aggregator that will return the extracted value for each entry in the map.- Type Parameters:
K
- the type of the entry's keyV
- the type of the entry's valueR
- the type of the aggregation result- Parameters:
sMethod
- the name of the method to use to obtain the value
-
script
public static <K,V,P,R> InvocableMap.StreamingAggregator<K,V,P,R> script(String sLanguage, String sName, Object... aoArgs)
Return an aggregator that is implemented in a script using the specified language.- Type Parameters:
K
- the type of key that theInvocableMap.StreamingAggregator
will receiveV
- the type of value that theInvocableMap.StreamingAggregator
will receiveP
- the type of partial result thisInvocableMap.StreamingAggregator
will returnR
- the type of final result thisInvocableMap.StreamingAggregator
will return- Parameters:
sLanguage
- the string specifying one of the supported languagessName
- the name of theInvocableMap.StreamingAggregator
that needs to be evaluatedaoArgs
- the arguments to be passed to theInvocableMap.StreamingAggregator
- Returns:
- an instance of
InvocableMap.StreamingAggregator
- Throws:
ScriptException
- if thescript
cannot be loaded or any errors occur during its executionIllegalArgumentException
- if the specified language is not supported
-
script
public static <K,V,P,R> InvocableMap.StreamingAggregator<K,V,P,R> script(String sLanguage, String sName, int characteristics, Object... aoArgs)
Return an aggregator that is implemented in a script using the specified language.- Type Parameters:
K
- the type of key that theInvocableMap.StreamingAggregator
will receiveV
- the type of value that theInvocableMap.StreamingAggregator
will receiveP
- the type of partial result thisInvocableMap.StreamingAggregator
will returnR
- the type of final result thisInvocableMap.StreamingAggregator
will return- Parameters:
sLanguage
- the string specifying one of the supported languagessName
- the name of theInvocableMap.StreamingAggregator
that needs to be evaluatedcharacteristics
- a bit mask representing the set of characteristics of this aggregatoraoArgs
- the arguments to be passed to theInvocableMap.StreamingAggregator
- Returns:
- an instance of
InvocableMap.StreamingAggregator
- Throws:
ScriptException
- if thescript
cannot be loaded or any errors occur during its executionIllegalArgumentException
- if the specified language is not supported- See Also:
InvocableMap.StreamingAggregator.characteristics()
-
-