code: public final Future<JcrRepository> startRepository( final String repositoryName ) throws NoSuchRepositoryException {
          final JcrRepository repository = getRepository(repositoryName);
          if (repository.getState() == State.RUNNING) {
              return ImmediateFuture.create(repository);
          }
  
          // Create an initializer that will start the repository ...
          return repositoryStarterService.submit(() -> {
              // Instantiate (and start) the repository ...
              try {
                  repository.start();
                  return repository;
              } catch (Exception e) {
                  // Something went wrong, so undeploy the repository ...
                  undeploy(repositoryName);
                  throw e;
              }
          });
      }
docs: Asynchronously start the deployed {@link Repository} instance with the given the name, and return a future that will return
  the Repository instance. If the Repository is already running, this method returns a future that returns immediately.
  <p>
  Note that the caller does not have to wait for the startup process to complete. However, to do so the caller merely calls
  {@link Future#get() get()} or {@link Future#get(long, TimeUnit) get(long,TimeUnit)} on the future to return the repository
  instance. Note that any exceptions thrown during the startup process will be wrapped in an {@link ExecutionException}
  thrown by the Future's <code>get</code> methods.
  </p>
  
  @param repositoryName the name of the deployed repository
  @return the state of the repository instance; never null
  @throws IllegalArgumentException if the repository name is null, blank or invalid
  @throws NoSuchRepositoryException if there is no repository with the specified name
  @throws IllegalStateException if this engine is not {@link #getState() running}
  @see #deploy(RepositoryConfiguration)
  @see #undeploy(String)