Class StreamInfo.XInfoConsumers
java.lang.Object
org.springframework.data.redis.connection.stream.StreamInfo.XInfoConsumers
- All Implemented Interfaces:
Iterable<StreamInfo.XInfoConsumer>,Supplier<Stream<StreamInfo.XInfoConsumer>>,org.springframework.data.util.Streamable<StreamInfo.XInfoConsumer>
- Enclosing class:
- StreamInfo
public static class StreamInfo.XInfoConsumers
extends Object
implements org.springframework.data.util.Streamable<StreamInfo.XInfoConsumer>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidforEach(Consumer<? super StreamInfo.XInfoConsumer> action) Performs the given action on every availableStreamInfo.XInfoConsumerof thisStreamInfo.XInfoConsumers.static StreamInfo.XInfoConsumersget(int index) Returns theStreamInfo.XInfoConsumerelement at the given index.intTotal number of consumers in the consumer group.booleanisEmpty()iterator()Returns an iterator over theStreamInfo.XInfoConsumerelements.intsize()Returns the number ofStreamInfo.XInfoConsumeravailable.stream()Returns a sequentialStreamofStreamInfo.XInfoConsumer.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
spliteratorMethods inherited from interface org.springframework.data.util.Streamable
and, and, and, and, filter, flatMap, get, map, toList, toSet
-
Constructor Details
-
XInfoConsumers
-
-
Method Details
-
fromList
-
getConsumerCount
public int getConsumerCount()Total number of consumers in the consumer group.- Returns:
- zero if none available.
-
size
public int size()Returns the number ofStreamInfo.XInfoConsumeravailable.- Returns:
- zero if none available.
- See Also:
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceorg.springframework.data.util.Streamable<StreamInfo.XInfoConsumer>- Returns:
- true if no groups associated.
-
iterator
Returns an iterator over theStreamInfo.XInfoConsumerelements.- Specified by:
iteratorin interfaceIterable<StreamInfo.XInfoConsumer>- Returns:
-
get
Returns theStreamInfo.XInfoConsumerelement at the given index.- Returns:
- the element at the specified position.
- Throws:
IndexOutOfBoundsException- if the index is out of range.
-
stream
Returns a sequentialStreamofStreamInfo.XInfoConsumer.- Specified by:
streamin interfaceorg.springframework.data.util.Streamable<StreamInfo.XInfoConsumer>- Returns:
-
forEach
Performs the given action on every availableStreamInfo.XInfoConsumerof thisStreamInfo.XInfoConsumers.- Specified by:
forEachin interfaceIterable<StreamInfo.XInfoConsumer>- Parameters:
action-
-
toString
-