public void add(RegionEntry entry, Object value) {
      assert value != null;
      // Values must NOT be null and ConcurrentHashMap does not support null values.
      if (value == null) {
        return;
      }
      Object object = map.get(entry);
      if (object == null) {
        map.put(entry, value);
      } else if (object instanceof Collection) {
        Collection coll = (Collection) object;
        // If its a list query might get ConcurrentModificationException.
        // This can only happen for Null mapped or Undefined entries in a
        // RangeIndex. So we are synchronizing on ArrayList.
        if (useList) {
          synchronized (coll) {
            coll.add(value);
          }
        } else {
          coll.add(value);
        }
      } else {
        Collection coll = useList ? new ArrayList(2) : new IndexConcurrentHashSet(2, 0.75f, 1);
        coll.add(object);
        coll.add(value);
        map.put(entry, coll);
      }
      atomicUpdater.incrementAndGet(this);
    }
We do NOT use any locks here as every add is for a RegionEntry which is locked before coming
here. No two threads can be entering in this method together for a RegionEntry.
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java