Package io.lettuce.core
Class LPosArgs
- java.lang.Object
-
- io.lettuce.core.LPosArgs
-
- All Implemented Interfaces:
CompositeArgument
public class LPosArgs extends Object implements CompositeArgument
Argument list builder for the Redis LPOS command. Static import the methods fromLPosArgs.Builder
and call the methods:maxlen(…)
.LPosArgs
is a mutable object and instances should be used only once to avoid shared mutable state.- Since:
- 5.3.2
- Author:
- Mark Paluch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LPosArgs.Builder
Builder entry points forLPosArgs
.
-
Constructor Summary
Constructors Constructor Description LPosArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
voidbuild(CommandArgs<K,V> args)
Build command arguments and contribute arguments toCommandArgs
.LPosArgs
maxlen(long maxlen)
Limit list scanning tomaxlen
entries.LPosArgs
rank(long rank)
Specify the rank of the first element to return, in case there are multiple matches.
-
-
-
Method Detail
-
maxlen
public LPosArgs maxlen(long maxlen)
Limit list scanning tomaxlen
entries.- Parameters:
maxlen
- number greater 0.- Returns:
this
-
rank
public LPosArgs rank(long rank)
Specify the rank of the first element to return, in case there are multiple matches.- Parameters:
rank
- number.- Returns:
this
-
build
public <K,V> void build(CommandArgs<K,V> args)
Description copied from interface:CompositeArgument
Build command arguments and contribute arguments toCommandArgs
.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.
- Specified by:
build
in interfaceCompositeArgument
- Type Parameters:
K
- Key type.V
- Value type.- Parameters:
args
- the command arguments, must not benull
.
-
-