code: @Override
      protected K addService(S service, ServiceProperties props) {
          K key = keyFunction.apply(service, props);
          if (key != null) {
              if (serviceMap.putIfAbsent(key, service) != null) {
                  getLogger().error("Duplicate key \"{}\" detected for service {}.", key, props.getServiceId());
                  return null;
              }
              return key;
          }
          return null;
      }
docs: ----------------------------------------------------------------------------------------------------------------------