@Override
  public Router getRouter() {
    try {
      AmbryCache blobMetadataCache =
          new AmbryCache(routerConfig.routerBlobMetadataCacheId, routerConfig.routerBlobMetadataCacheEnabled,
              routerConfig.routerMaxNumMetadataCacheEntries, routerMetrics.getMetricRegistry());
      logger.info("[{}] Smallest blob to qualify for metadata caching = {} bytes", blobMetadataCache.getCacheId(),
          routerConfig.routerSmallestBlobForMetadataCache);
      // Create the RepairRequestsDbFactory
      RepairRequestsDbFactory repairRequestsDbFactory = null;
      if (routerConfig.routerRepairRequestsDbFactory != null) {
        try {
          String localDc = clusterMap.getDatacenterName(clusterMap.getLocalDatacenterId());
          repairRequestsDbFactory = Utils.getObj(routerConfig.routerRepairRequestsDbFactory, verifiableProperties,
              clusterMap.getMetricRegistry(), localDc, time);
          logger.info("Created RepairRequestsDbFactory {} ", repairRequestsDbFactory);
        } catch (Exception e) {
          logger.error("Failed to create RepairRequestsDbFactory", e);
        }
      }
      IdConverterFactory idConverterFactory = null;
      if (routerConfig.idConverterFactory != null) {
        try {
          IdSigningService idSigningService =
              Utils.<IdSigningServiceFactory>getObj(routerConfig.idSigningServiceFactory, verifiableProperties,
                  clusterMap.getMetricRegistry()).getIdSigningService();
          NamedBlobDb namedBlobDb = Utils.isNullOrEmpty(routerConfig.namedBlobDbFactory) ? null
              : Utils.<NamedBlobDbFactory>getObj(routerConfig.namedBlobDbFactory, verifiableProperties,
                  clusterMap.getMetricRegistry(), accountService).getNamedBlobDb();
          idConverterFactory =
              Utils.getObj(routerConfig.idConverterFactory, verifiableProperties, clusterMap.getMetricRegistry(),
                  idSigningService, namedBlobDb);
        } catch (Exception e) {
          logger.error("Failed to create idConverterFactory");
        }
      }
      return new NonBlockingRouter(routerConfig, repairRequestsDbFactory, routerMetrics, networkClientFactory,
          notificationSystem, clusterMap, kms, cryptoService, cryptoJobHandler, accountService, time,
          defaultPartitionClass, blobMetadataCache, idConverterFactory);
    } catch (IOException | ReflectiveOperationException e) {
      throw new IllegalStateException("Error instantiating NonBlocking Router ", e);
    }
  }
Construct and return a {@link NonBlockingRouter}
@return a {@link NonBlockingRouter}
ambry-router/src/main/java/com/github/ambry/router/NonBlockingRouterFactory.java