code: private void fillServiceMetadata(final String serviceName, final int index) {
          final int servAreaOffset = noOfServicesOffset + BitUtil.SIZE_OF_INT;
          metaDataBuffer.putInt(noOfServicesOffset, metaDataBuffer.getInt(noOfServicesOffset) + 1);
          int serviceNameOffset = getServiceNameOffset(servAreaOffset);
          int serviceLocationOffset = serviceNameOffset + serviceName.length() + BitUtil.SIZE_OF_INT;
          metaDataBuffer.putStringUtf8(serviceNameOffset, serviceName, ByteOrder.nativeOrder());
  
          initializeServiceRefMetadata(serviceLocationOffset, index * OFFSETS_PER_SERVICE);
          prevServiceOffset = serviceNameOffset;
          prevServiceName = serviceName;
      }
docs: Method adding services metadata
  @param monitorMetaDataBuffer - the metadata buffer