Package akka.stream.scaladsl
Interface PartitionHub.ConsumerInfo
-
- All Superinterfaces:
PartitionHub.ConsumerInfo
- Enclosing class:
- PartitionHub<T>
public static interface PartitionHub.ConsumerInfo extends PartitionHub.ConsumerInfo
Sequence of all identifiers of current consumers.Use this method only if you need to enumerate consumer existing ids. When selecting a specific consumerId by its index, prefer using the dedicated
consumerIdByIdx(int)
method instead, which is optimised for this use case.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
consumerIdByIdx(int idx)
Obtain consumer identifier by indexscala.collection.immutable.IndexedSeq<java.lang.Object>
consumerIds()
int
queueSize(long consumerId)
Approximate number of buffered elements for a consumer.int
size()
Number of attached consumers.-
Methods inherited from interface akka.stream.javadsl.PartitionHub.ConsumerInfo
getConsumerIds
-
-
-
-
Method Detail
-
consumerIdByIdx
long consumerIdByIdx(int idx)
Obtain consumer identifier by index- Specified by:
consumerIdByIdx
in interfacePartitionHub.ConsumerInfo
-
consumerIds
scala.collection.immutable.IndexedSeq<java.lang.Object> consumerIds()
-
queueSize
int queueSize(long consumerId)
Approximate number of buffered elements for a consumer. Larger value than other consumers could be an indication of that the consumer is slow.Note that this is a moving target since the elements are consumed concurrently.
- Specified by:
queueSize
in interfacePartitionHub.ConsumerInfo
- Parameters:
consumerId
- (undocumented)- Returns:
- (undocumented)
-
size
int size()
Number of attached consumers.- Specified by:
size
in interfacePartitionHub.ConsumerInfo
- Returns:
- (undocumented)
-
-