Package io.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static <K> Consumer<K>
from(K group, K name)
Create a new consumer.K
getGroup()
K
getName()
int
hashCode()
String
toString()
-
-
-
Method Detail
-
from
public static <K> Consumer<K> from(K group, K name)
Create a new consumer.- Parameters:
group
- name of the consumer group, must not benull
or empty.name
- name of the consumer, must not benull
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.
-
-