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 class
ZAggregateArgs.Aggregate
-
Constructor Summary
Constructors Constructor Description ZAggregateArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZAggregateArgs
aggregate(ZAggregateArgs.Aggregate aggregate)
With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.ZAggregateArgs
max()
Configure theaggregate
function to beMAX
.ZAggregateArgs
min()
Configure theaggregate
function to beMIN
.ZAggregateArgs
sum()
Configure theaggregate
function to beSUM
.List<Object>
toArgs()
ZAggregateArgs
weights(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 theaggregate
function to beSUM
.- Returns:
- the current
ZAggregateArgs
-
min
public ZAggregateArgs min()
Configure theaggregate
function to beMIN
.- Returns:
- the current
ZAggregateArgs
-
max
public ZAggregateArgs max()
Configure theaggregate
function to beMAX
.- Returns:
- the current
ZAggregateArgs
-
toArgs
public List<Object> toArgs()
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments.
-
-