Module lettuce.core

Class XAutoClaimArgs<K>

java.lang.Object
io.lettuce.core.XAutoClaimArgs<K>
All Implemented Interfaces:
CompositeArgument

public class XAutoClaimArgs<K>
extends Object
implements CompositeArgument
Argument list builder for the Redis XAUTOCLAIM command. Static import the methods from XAutoClaimArgs.Builder and call the methods: xautoclaim(…) .

XAutoClaimArgs is a mutable object and instances should be used only once to avoid shared mutable state.

Since:
6.1
Author:
dengliming
  • Constructor Details

    • XAutoClaimArgs

      public XAutoClaimArgs()
  • Method Details

    • consumer

      public XAutoClaimArgs<K> consumer​(Consumer<K> consumer)
      Configure the Consumer.
      Parameters:
      consumer -
      Returns:
      this.
    • count

      public XAutoClaimArgs<K> count​(long count)
      The optional count argument, which defaults to 100, is the upper limit of the number of entries that the command attempts to claim.
      Parameters:
      count -
      Returns:
      this.
    • justid

      public XAutoClaimArgs<K> justid()
      The optional JUSTID argument changes the reply to return just an array of IDs of messages successfully claimed, without returning the actual message. Using this option means the retry counter is not incremented.
      Returns:
      this.
    • minIdleTime

      public XAutoClaimArgs<K> minIdleTime​(long milliseconds)
      Return only messages that are idle for at least milliseconds.
      Parameters:
      milliseconds - min idle time.
      Returns:
      this.
    • minIdleTime

      public XAutoClaimArgs<K> minIdleTime​(Duration minIdleTime)
      Return only messages that are idle for at least minIdleTime.
      Parameters:
      minIdleTime - min idle time.
      Returns:
      this.
    • startId

      public XAutoClaimArgs<K> startId​(String startId)
      Set the startId.
      Parameters:
      startId -
      Returns:
    • isJustid

      public boolean isJustid()
    • 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.