void updateDataInner(int fileId, int nameId) {
    rwLock.writeLock().lock();
    try {
      int single = singularMapping.get(nameId);
      int[] multi = multiMapping.get(nameId);
      if (single == NULL_NAME_ID && multi == null) {
        singularMapping.put(nameId, fileId);
      }
      else if (multi == null) {
        multiMapping.put(nameId, new int[]{single, fileId});
        singularMapping.remove(nameId);
      }
      else if (multi.length == 2) {
        multiMapping.put(nameId, new int[]{3, multi[0], multi[1], fileId, NULL_NAME_ID});
      }
      else if (multi[multi.length - 1] == 0) {
        multi[0]++;
        multi[multi[0]] = fileId;
      }
      else {
        int[] next = Arrays.copyOf(multi, multi.length * 2 + 1);
        next[0]++;
        next[next[0]] = fileId;
        multiMapping.put(nameId, next);
      }
      if (CHECK_CONSISTENCY) {
        checkConsistency(nameId);
      }
    }
    finally {
      rwLock.writeLock().unlock();
    }
  }
void updateDataInner(int fileId, int nameId)