public void forEach(final IntObjConsumer<String> consumer)
    {
        int counterId = 0;

        final AtomicBuffer metaDataBuffer = this.metaDataBuffer;
        for (int i = 0, capacity = metaDataBuffer.capacity(); i < capacity; i += METADATA_LENGTH)
        {
            final int recordStatus = metaDataBuffer.getIntVolatile(i);

            if (RECORD_ALLOCATED == recordStatus)
            {
                consumer.accept(counterId, labelValue(metaDataBuffer, i));
            }
            else if (RECORD_UNUSED == recordStatus)
            {
                break;
            }

            counterId++;
        }
    }
public void forEach ( final IntObjConsumer < String > consumer ) { int counterId = 0 ; final AtomicBuffer metaDataBuffer = this . metaDataBuffer ; for ( int i = 0 , capacity = metaDataBuffer . capacity ( ) ; i < capacity ; i += METADATA_LENGTH ) { final int recordStatus = metaDataBuffer . getIntVolatile ( i ) ; if ( RECORD_ALLOCATED == recordStatus ) { consumer . accept ( counterId , labelValue ( metaDataBuffer , i ) ) ; } else if ( RECORD_UNUSED == recordStatus ) { break ; } counterId ++ ; } }
Iterate over all labels in the label buffer.

@param consumer function to be called for each label.