Class StreamInfo.XInfoGroups
java.lang.Object
org.springframework.data.redis.connection.stream.StreamInfo.XInfoGroups
- All Implemented Interfaces:
Iterable<StreamInfo.XInfoGroup>
,Supplier<Stream<StreamInfo.XInfoGroup>>
,Streamable<StreamInfo.XInfoGroup>
- Enclosing class:
- StreamInfo
public static class StreamInfo.XInfoGroups
extends Object
implements Streamable<StreamInfo.XInfoGroup>
Value object holding general information about consumer groups associated with a
Redis Stream.
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionvoid
forEach
(Consumer<? super StreamInfo.XInfoGroup> action) Performs the given action on every availableStreamInfo.XInfoGroup
of thisStreamInfo.XInfoGroups
.static StreamInfo.XInfoGroups
Factory method to create a new instance ofStreamInfo.XInfoGroups
.get
(int index) Returns theStreamInfo.XInfoGroup
element at the given index.int
Total number of associated consumer groups.boolean
isEmpty()
iterator()
Returns an iterator over theStreamInfo.XInfoGroup
elements.int
size()
Returns the number ofStreamInfo.XInfoGroup
available.stream()
Returns a sequentialStream
ofStreamInfo.XInfoGroup
.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
spliterator
-
Method Details
-
fromList
Factory method to create a new instance ofStreamInfo.XInfoGroups
.- Parameters:
source
- the raw value source.- Returns:
-
groupCount
public int groupCount()Total number of associated consumer groups.- Returns:
- zero if none available.
-
size
public int size()Returns the number ofStreamInfo.XInfoGroup
available.- Returns:
- zero if none available.
- See Also:
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceStreamable<StreamInfo.XInfoGroup>
- Returns:
- true if no groups associated.
-
iterator
Returns an iterator over theStreamInfo.XInfoGroup
elements.- Specified by:
iterator
in interfaceIterable<StreamInfo.XInfoGroup>
- Returns:
-
get
Returns theStreamInfo.XInfoGroup
element at the given index.- Returns:
- the element at the specified position.
- Throws:
IndexOutOfBoundsException
- if the index is out of range.
-
stream
Returns a sequentialStream
ofStreamInfo.XInfoGroup
.- Specified by:
stream
in interfaceStreamable<StreamInfo.XInfoGroup>
- Returns:
-
forEach
Performs the given action on every availableStreamInfo.XInfoGroup
of thisStreamInfo.XInfoGroups
.- Specified by:
forEach
in interfaceIterable<StreamInfo.XInfoGroup>
- Parameters:
action
-
-
toString
-