Package io.quarkus.redis.datasource
Class SortArgs
- java.lang.Object
-
- io.quarkus.redis.datasource.SortArgs
-
- All Implemented Interfaces:
RedisCommandExtraArguments
public class SortArgs extends Object implements RedisCommandExtraArguments
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SortArgs.Limit
Represent a limit.
-
Constructor Summary
Constructors Constructor Description SortArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortArgs
alpha()
When the list contains string values and you want to sort them lexicographically, use the ALPHA modifier.SortArgs
ascending()
UseASC
order (from small to large).SortArgs
by(String by)
Sets theBY
pattern.SortArgs
descending()
UseDESC
order (from large to small).SortArgs
get(String get)
Adds aGET
option.SortArgs
get(List<String> get)
Sets theGET
option.SortArgs
limit(long count)
Sets the limit option with only the number of elements.SortArgs
limit(long offset, long count)
Sets the limit option using the offset and count.SortArgs
limit(SortArgs.Limit limit)
Sets the limit option.List<String>
toArgs()
-
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
-
ascending
public SortArgs ascending()
UseASC
order (from small to large).- Returns:
- the current
SortArgs
-
descending
public SortArgs descending()
UseDESC
order (from large to small).- Returns:
- the current
SortArgs
-
limit
public SortArgs limit(SortArgs.Limit limit)
Sets the limit option.- Parameters:
limit
- the limit value- Returns:
- the current
SortArgs
-
limit
public SortArgs limit(long offset, long count)
Sets the limit option using the offset and count.- Parameters:
offset
- the offset (zero-based)count
- the number of element- Returns:
- the current
SortArgs
-
limit
public SortArgs limit(long count)
Sets the limit option with only the number of elements.- Parameters:
count
- the number of elements- Returns:
- the current
SortArgs
-
alpha
public SortArgs alpha()
When the list contains string values and you want to sort them lexicographically, use the ALPHA modifier.- Returns:
- the current
SortArgs
-
by
public SortArgs by(String by)
Sets theBY
pattern.- Parameters:
by
- the by value- Returns:
- the current
SortArgs
-
get
public SortArgs get(List<String> get)
Sets theGET
option. Retrieving external keys based on the elements in a list, set or sorted set can be done using the {code GET} options. TheGET
option can be used multiple times in order to get more keys for every element of the original list, set or sorted set. It is also possible toGET
the element itself using the special pattern#
- Parameters:
get
- the get value- Returns:
- the current
SortArgs
-
get
public SortArgs get(String get)
Adds aGET
option. Retrieving external keys based on the elements in a list, set or sorted set can be done using the {code GET} options. TheGET
option can be used multiple times in order to get more keys for every element of the original list, set or sorted set. It is also possible toGET
the element itself using the special pattern#
- Parameters:
get
- the get value- Returns:
- the current
SortArgs
-
toArgs
public List<String> toArgs()
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments, encoded as a list of String.
-
-