@Override
  public int getNameId(@NotNull String name) throws ReferenceIndexUnavailableException {
    try {
      if (!myReadDataLock.tryLock()) {
        return 0;
      }
      try {
        if (myReader == null) {
          throw new ReferenceIndexUnavailableException();
        }
        return myReader.getNameEnumerator().tryEnumerate(name);
      }
      finally {
        myReadDataLock.unlock();
      }
    }
    catch (Exception e) {
      onException(e, "get name-id");
      throw new ReferenceIndexUnavailableException();
    }
  }
@Override
  public int getNameId(@NotNull String name)