Package io.lettuce.core
Class ZAggregateArgs
- java.lang.Object
-
- io.lettuce.core.ZAggregateArgs
-
- All Implemented Interfaces:
CompositeArgument
- Direct Known Subclasses:
ZStoreArgs
public class ZAggregateArgs extends Object implements CompositeArgument
Argument list builder for the Redis ZUNION, ZUNIONSTORE, ZINTER and ZINTERSTORE commands. Static import the methods fromZAggregateArgs.Builder
and chain the method calls:weights(1, 2).max()
.- Since:
- 6.1
- Author:
- Will Glozer, Xy Ma, Mark Paluch, Mikhael Sokolov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ZAggregateArgs.Builder
Builder entry points forScanArgs
.
-
Constructor Summary
Constructors Constructor Description ZAggregateArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
voidbuild(CommandArgs<K,V> args)
Build command arguments and contribute arguments toCommandArgs
.ZAggregateArgs
max()
Aggregate scores of elements existing across multiple sets by using the highest score.ZAggregateArgs
min()
Aggregate scores of elements existing across multiple sets by using the lowest score.ZAggregateArgs
sum()
Aggregate scores of elements existing across multiple sets by summing up.ZAggregateArgs
weights(double... weights)
Specify a multiplication factor for each input sorted set.
-
-
-
Method Detail
-
weights
public ZAggregateArgs weights(double... weights)
Specify a multiplication factor for each input sorted set.- Parameters:
weights
- must not benull
.- Returns:
this
ZAggregateArgs
.
-
sum
public ZAggregateArgs sum()
Aggregate scores of elements existing across multiple sets by summing up.- Returns:
this
ZAggregateArgs
.
-
min
public ZAggregateArgs min()
Aggregate scores of elements existing across multiple sets by using the lowest score.- Returns:
this
ZAggregateArgs
.
-
max
public ZAggregateArgs max()
Aggregate scores of elements existing across multiple sets by using the highest score.- Returns:
this
ZAggregateArgs
.
-
build
public <K,V> void build(CommandArgs<K,V> args)
Description copied from interface:CompositeArgument
Build command arguments and contribute arguments toCommandArgs
.Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.
- Specified by:
build
in interfaceCompositeArgument
- Type Parameters:
K
- Key type.V
- Value type.- Parameters:
args
- the command arguments, must not benull
.
-
-