Class LPosArgs

  • All Implemented Interfaces:
    CompositeArgument

    public class LPosArgs
    extends Object
    implements CompositeArgument
    Argument list builder for the Redis LPOS command. Static import the methods from LPosArgs.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
    • Constructor Detail

      • LPosArgs

        public LPosArgs()
    • Method Detail

      • maxlen

        public LPosArgs maxlen​(long maxlen)
        Limit list scanning to maxlen 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 to CommandArgs.

        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 interface CompositeArgument
        Type Parameters:
        K - Key type.
        V - Value type.
        Parameters:
        args - the command arguments, must not be null.