protected Long addToConflationMap(Conflatable event, Long newPosition) {
    String r = event.getRegionToConflate();
    ConcurrentMap latestIndexesForRegion = (ConcurrentMap) indexes.get(r);
    if (latestIndexesForRegion == null) {
      synchronized (this) {
        if ((latestIndexesForRegion = (ConcurrentMap) indexes.get(r)) == null) {
          latestIndexesForRegion = createConcurrentMap();
          Map newMap = new HashMap(indexes);
          newMap.put(r, latestIndexesForRegion);
          indexes = Collections.unmodifiableMap(newMap);
        }
      }
    }
    Object key = event.getKeyToConflate();
    return (Long) latestIndexesForRegion.put(key, newPosition);
  }
Returns the previous counter if any for the Conflatable object

@param event Object to be conflated
@param newPosition New Conflatable object's position
@return Long object denoting the position of the previous conflatable object
geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java