code: private ServiceDirectoryManagerFactory getServiceDirectoryManagerFactory() throws ServiceException{
          if(directoryManagerFactory == null){
              synchronized(this){
                  if(isShutdown){
                      ServiceDirectoryError error = new ServiceDirectoryError(ErrorCode.SERVICE_DIRECTORY_IS_SHUTDOWN);
                      throw new ServiceException(error);
                  }
                  if(directoryManagerFactory == null){
                      String custProvider = Configurations
                              .getString(SD_API_SERVICE_DIRECTORY_MANAGER_FACTORY_PROVIDER_PROPERTY);
  
                      if (custProvider != null && !custProvider.isEmpty()) {
                          try {
                              Class<?> provider = Class.forName(custProvider);
                              if (ServiceDirectoryManagerFactory.class
                                      .isAssignableFrom(provider)) {
                                  directoryManagerFactory = (ServiceDirectoryManagerFactory) provider
                                          .newInstance();
                                  directoryManagerFactory.initialize(this);
                                  LOGGER.info("Instantialized the ServiceDirectoryManager with customer implementation " + custProvider + ".");
                              }
                          } catch (Exception e) {
                              LOGGER.error(
                                      "Instantialize ServiceDirectoryManagerFactory from "
                                              + custProvider + " failed.", e);
                          }
                      }
  
                      if (directoryManagerFactory == null) {
                          LOGGER.info("Instantialized the ServiceDirectoryManager with default implementation StandServiceDirectoryManager.");
                          directoryManagerFactory = new DefaultServiceDirectoryManagerFactory();
                          directoryManagerFactory.initialize(this);
                      }
                  }
              }
          }
          return directoryManagerFactory;
      }
docs: Get the ServiceDirectoryManagerFactory.
  
  It is lazy initialized and thread safe.
  It looks up the configuration "service.directory.manager.factory.provider".
  If the configuration is null or the provider instantialization fails, it will instantialize the DefaultServiceDirectoryManagerFactory.
  
  @return
  the ServiceDirectoryManagerFactory instance.