Module lettuce.core

Class XReadArgs

java.lang.Object
io.lettuce.core.XReadArgs

public class XReadArgs
extends Object
Argument list builder for the Redis XREAD and XREADGROUP commands. Static import the methods from XReadArgs.Builder and call the methods: block(…) .

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

Since:
5.1
Author:
Mark Paluch
  • Constructor Details

    • XReadArgs

      public XReadArgs()
  • Method Details

    • block

      public XReadArgs block​(long milliseconds)
      Perform a blocking read and wait up to milliseconds for a new stream message.
      Parameters:
      milliseconds - max time to wait.
      Returns:
      this.
    • block

      public XReadArgs block​(Duration timeout)
      Perform a blocking read and wait up to a timeout for a new stream message.
      Parameters:
      timeout - max time to wait.
      Returns:
      this.
    • count

      public XReadArgs count​(long count)
      Limit read to count messages.
      Parameters:
      count - number of messages.
      Returns:
      this.
    • noack

      public XReadArgs noack​(boolean noack)
      Use NOACK option to disable auto-acknowledgement. Only valid for XREADGROUP.
      Parameters:
      noack - true to disable auto-ack.
      Returns:
      this.
    • build

      public <K,​ V> void build​(CommandArgs<K,​V> args)