public class SortArgs extends Object implements CompositeArgument
SortArgs.Builder and chain the method calls: by("weight_*").desc().limit(0, 2).
ScanArgs is a mutable object and instances should be used only once to avoid shared mutable state.
| Modifier and Type | Class and Description |
|---|---|
static class |
SortArgs.Builder
Builder entry points for
SortArgs. |
| Constructor and Description |
|---|
SortArgs() |
| Modifier and Type | Method and Description |
|---|---|
SortArgs |
alpha()
Apply lexicographically sort.
|
SortArgs |
asc()
Apply numeric sort in ascending order.
|
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs. |
SortArgs |
by(String pattern)
Sort keys by an external list.
|
SortArgs |
desc()
Apply numeric sort in descending order.
|
SortArgs |
get(String pattern)
Retrieve external keys during sort.
|
SortArgs |
limit(Limit limit)
Limit the number of returned elements.
|
SortArgs |
limit(long offset,
long count)
Limit the number of returned elements.
|
public SortArgs by(String pattern)
* with the actual
value of the element in the list.pattern - key name pattern.this SortArgs.public SortArgs limit(long offset, long count)
offset - count - this SortArgs.public SortArgs limit(Limit limit)
limit - must not be null.this SortArgs.public SortArgs get(String pattern)
# and * wildcards.pattern - must not be null.this SortArgs.public <K,V> void build(CommandArgs<K,V> args)
CompositeArgumentCommandArgs.
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.
build in interface CompositeArgumentK - Key type.V - Value type.args - the command arguments, must not be null.Copyright © 2019 lettuce.io. All rights reserved.