Module lettuce.core

Class Consumer<K>

java.lang.Object
io.lettuce.core.Consumer<K>

public class Consumer<K>
extends Object
Value object representing a Stream consumer within a consumer group. Group name and consumer name are encoded as keys.
Since:
5.1
Author:
Mark Paluch
See Also:
RedisCodec
  • Method Details

    • from

      public static <K> Consumer<K> from​(K group, K name)
      Create a new consumer.
      Parameters:
      group - name of the consumer group, must not be null or empty.
      name - name of the consumer, must not be null or empty.
      Returns:
      the consumer Consumer object.
    • getGroup

      public K getGroup()
      Returns:
      name of the group.
    • getName

      public K getName()
      Returns:
      name of the consumer.
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object