public class SortArgs extends Object
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.
|
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
.Copyright © 2018 lettuce.io. All rights reserved.