Package io.quarkus.redis.datasource.list
Class LPosArgs
- java.lang.Object
-
- io.quarkus.redis.datasource.list.LPosArgs
-
- All Implemented Interfaces:
RedisCommandExtraArguments
public class LPosArgs extends Object implements RedisCommandExtraArguments
Represents the extra parameter of the LPOS command
-
-
Constructor Summary
Constructors Constructor Description LPosArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LPosArgs
maxlen(long max)
the MAXLEN option tells the command to compare the provided element only with a given maximum number of list items.LPosArgs
rank(long rank)
The RANK option specifies the "rank" of the first element to return, in case there are multiple matches.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
-
rank
public LPosArgs rank(long rank)
The RANK option specifies the "rank" of the first element to return, in case there are multiple matches.- Parameters:
rank
- the rank value, can be negative- Returns:
- the current
LPosArgs
-
maxlen
public LPosArgs maxlen(long max)
the MAXLEN option tells the command to compare the provided element only with a given maximum number of list items. So for instance specifying MAXLEN 1000 will make sure that the command performs only 1000 comparisons, effectively running the algorithm on a subset of the list.- Parameters:
max
- the max value, must be positive- Returns:
- the current
LPosArgs
-
toArgs
public List<String> toArgs()
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments, encoded as a list of String.
-
-