protected void doUpdateIndex(MavenIndexId mavenIndexId, boolean multithreaded, MavenServerProgressIndicator indicator)
    throws MavenServerProcessCanceledException, MavenServerIndexerException {
    try {
      final IndexingContext context = getIndex(mavenIndexId);
      boolean readyToUpdate = myLocks.add(mavenIndexId.indexId);

      if (readyToUpdate) {
        try {
          File repository = context.getRepository();
          if (repository != null) { // is local repository
            scanAndUpdateLocalRepositoryIndex(indicator, context, multithreaded);
          }
          else {
            downloadRemoteIndex(indicator, context);
          }
        }
        finally {
          myLocks.remove(mavenIndexId.indexId);
        }
      }
    }
    catch (
      MavenProcessCanceledRuntimeException e) {
      throw new MavenServerProcessCanceledException();
    }
    catch (Throwable e) {
      throw new MavenServerIndexerException(wrapException(e));
    }
  }
protected void doUpdateIndex(MavenIndexId mavenIndexId, boolean multithreaded, MavenServerProgressIndicator indicator)