Class ZAggregateArgs
- java.lang.Object
-
- io.quarkus.redis.datasource.sortedset.ZAggregateArgs
-
- All Implemented Interfaces:
RedisCommandExtraArguments
public class ZAggregateArgs extends Object implements RedisCommandExtraArguments
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZAggregateArgs.Aggregate
-
Constructor Summary
Constructors Constructor Description ZAggregateArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZAggregateArgsaggregate(ZAggregateArgs.Aggregate aggregate)With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.ZAggregateArgsmax()Configure theaggregatefunction to beMAX.ZAggregateArgsmin()Configure theaggregatefunction to beMIN.ZAggregateArgssum()Configure theaggregatefunction to beSUM.List<Object>toArgs()ZAggregateArgsweights(double... weights)Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.redis.datasource.RedisCommandExtraArguments
toArgs
-
-
-
-
Method Detail
-
weights
public ZAggregateArgs weights(double... weights)
Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set. This means that the score of every element in every input sorted set is multiplied by this factor before being passed to the aggregation function. When WEIGHTS is not given, the multiplication factors default to 1.- Parameters:
weights- the weight values- Returns:
- the current
ZAggregateArgs
-
aggregate
public ZAggregateArgs aggregate(ZAggregateArgs.Aggregate aggregate)
With the AGGREGATE option, it is possible to specify how the results of the union are aggregated. This option defaults to SUM, where the score of an element is summed across the inputs where it exists. When this option is set to either MIN or MAX, the resulting set will contain the minimum or maximum score of an element across the inputs where it exists.- Parameters:
aggregate- the aggregate value- Returns:
- the current
ZAggregateArgs
-
sum
public ZAggregateArgs sum()
Configure theaggregatefunction to beSUM.- Returns:
- the current
ZAggregateArgs
-
min
public ZAggregateArgs min()
Configure theaggregatefunction to beMIN.- Returns:
- the current
ZAggregateArgs
-
max
public ZAggregateArgs max()
Configure theaggregatefunction to beMAX.- Returns:
- the current
ZAggregateArgs
-
toArgs
public List<Object> toArgs()
- Specified by:
toArgsin interfaceRedisCommandExtraArguments- Returns:
- the list of arguments.
-
-