@ Synchronized public int getNumberOfSegments ( ) { return assignedSegments . values ( ) . stream ( ) . mapToInt ( Map :: size ) . sum ( ) + unassignedSegments . size ( ) ; }
Returns the number of segments currently being read from and that are unassigned within the reader group .