long getHash(int id) {
    Lock lock = getLock(id).writeLock();
    lock.lock();
    try {
      Int2LongMap hashes = getHashes(id);
      long hash = hashes.get(id);
      if (hash == NON_EXISTENT_HASH) {
        hash = myCurrentHash.getAndIncrement();
        hashes.put(id, hash);
      }
      return hash;
    }
    finally {
      lock.unlock();
    }
  }
long getHash(int id)