Module lettuce.core

Class XReadArgs.StreamOffset<K>

java.lang.Object
io.lettuce.core.XReadArgs.StreamOffset<K>
Enclosing class:
XReadArgs

public static class XReadArgs.StreamOffset<K>
extends Object
Value object representing a Stream with its offset.
  • Method Details

    • latest

      public static <K> XReadArgs.StreamOffset<K> latest​(K name)
      Read all new arriving elements from the stream identified by name.
      Parameters:
      name - must not be null.
      Returns:
      the XReadArgs.StreamOffset object without a specific offset.
    • lastConsumed

      public static <K> XReadArgs.StreamOffset<K> lastConsumed​(K name)
      Read all new arriving elements from the stream identified by name with ids greater than the last one consumed by the consumer group.
      Parameters:
      name - must not be null.
      Returns:
      the XReadArgs.StreamOffset object without a specific offset.
    • from

      public static <K> XReadArgs.StreamOffset<K> from​(K name, String offset)
      Read all arriving elements from the stream identified by name starting at offset.
      Parameters:
      name - must not be null.
      offset - the stream offset.
      Returns:
      the XReadArgs.StreamOffset object without a specific offset.
    • getName

      public K getName()
    • getOffset

      public String getOffset()
    • toString

      public String toString()
      Overrides:
      toString in class Object