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 classSortArgs.LimitRepresent a limit.
-
Constructor Summary
Constructors Constructor Description SortArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortArgsalpha()When the list contains string values and you want to sort them lexicographically, use the ALPHA modifier.SortArgsascending()UseASCorder (from small to large).SortArgsby(String by)Sets theBYpattern.SortArgsdescending()UseDESCorder (from large to small).SortArgsget(String get)Adds aGEToption.SortArgsget(List<String> get)Sets theGEToption.SortArgslimit(long count)Sets the limit option with only the number of elements.SortArgslimit(long offset, long count)Sets the limit option using the offset and count.SortArgslimit(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()
UseASCorder (from small to large).- Returns:
- the current
SortArgs
-
descending
public SortArgs descending()
UseDESCorder (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 theBYpattern.- Parameters:
by- the by value- Returns:
- the current
SortArgs
-
get
public SortArgs get(List<String> get)
Sets theGEToption. Retrieving external keys based on the elements in a list, set or sorted set can be done using the {code GET} options. TheGEToption 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 toGETthe element itself using the special pattern#- Parameters:
get- the get value- Returns:
- the current
SortArgs
-
get
public SortArgs get(String get)
Adds aGEToption. Retrieving external keys based on the elements in a list, set or sorted set can be done using the {code GET} options. TheGEToption 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 toGETthe element itself using the special pattern#- Parameters:
get- the get value- Returns:
- the current
SortArgs
-
toArgs
public List<String> toArgs()
- Specified by:
toArgsin interfaceRedisCommandExtraArguments- Returns:
- the list of arguments, encoded as a list of String.
-
-