public final class Reducers extends Object
| 构造器和说明 |
|---|
Reducers() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Reducer |
avg(String field)
Return the average value of a numeric property.
|
static Reducer |
count()
Count the number of records in each group
|
static Reducer |
countDistinct(String field)
Count the number of distinct values for property
|
static Reducer |
countDistinctish(String field)
Same as COUNT_DISTINCT - but provide an approximation instead of an exact count
|
static Reducer |
firstValue(String field)
Return the first or top value of a given property in the group.
|
static Reducer |
firstValue(String field,
String by) |
static Reducer |
firstValue(String field,
String by,
org.redisson.api.SortOrder order) |
static Reducer |
max(String field)
Return the maximal value of a property, whether it is a string, number or NULL
|
static Reducer |
min(String field)
Return the minimal value of a property, whether it is a string, number or NULL.
|
static Reducer |
quantile(String field,
double quantile)
Return the value of a numeric property at a given quantile of the results.
|
static Reducer |
randomSample(String field,
int sampleSize)
Perform a reservoir sampling of the group elements with a given size, and return an array of the sampled items with an even distribution.
|
static Reducer |
stdDev(String field)
Return the standard deviation of a numeric property in the group.
|
static Reducer |
sum(String field)
Return the sum of all numeric values of a given property in a group.
|
static Reducer |
toList(String field)
Merge all distinct values of a given property into a single array.
|
public static Reducer max(String field)
field - public static Reducer avg(String field)
field - public static Reducer count()
public static Reducer countDistinct(String field)
field - public static Reducer countDistinctish(String field)
field - public static Reducer sum(String field)
field - public static Reducer min(String field)
field - public static Reducer stdDev(String field)
field - public static Reducer quantile(String field, double quantile)
field - quantile - public static Reducer toList(String field)
field - public static Reducer firstValue(String field)
field - public static Reducer firstValue(String field, String by)
field - by - If no BY is specified, we return the first value we encounter in the grouppublic static Reducer firstValue(String field, String by, org.redisson.api.SortOrder order)
Copyright © 2024. All rights reserved.