void putGIIDataInRegion() throws CacheException, InterruptedException {
    Set<Region.Entry> entrySet = region.entrySet(false);
    // check if the region is not empty. if there is
    // data, then the relevant data structures have to
    // be populated
    if (!entrySet.isEmpty()) {
      puttingGIIDataInQueue.set(true);
      final boolean isDebugEnabled = logger.isDebugEnabled();
      try {
        Region.Entry entry;
        Map orderedMap = new TreeMap<>();
        Iterator<Region.Entry> iterator = entrySet.iterator();
        Object key;
        while (iterator.hasNext()) {
          entry = iterator.next();
          key = entry.getKey();
          if (isDebugEnabled) {
            logger.debug("{} processing queue key {} and value {}", regionName, key,
                entry.getValue());
          }
          if (key instanceof Long) {
            if (!(entry.getValue() instanceof ClientMarkerMessageImpl)) {
              orderedMap.put(key, entry.getValue());
            }
          }
          region.localDestroy(key);
        }
        long max = 0;
        long counterInRegion;
        entrySet = orderedMap.entrySet();
        if (!entrySet.isEmpty()) {
          Map.Entry mapEntry;
          iterator = entrySet.iterator();
          while (iterator.hasNext()) {
            mapEntry = iterator.next();
            Conflatable val = (Conflatable) mapEntry.getValue();
            if (val != null && val.getEventId() != null) {
              counterInRegion = ((Long) mapEntry.getKey()).intValue();
              // TODO: remove this assertion
              Assert.assertTrue(counterInRegion > max);
              max = counterInRegion;
              put(val);
            } else if (isDebugEnabled) {
              logger.debug(
                  "{} bug 44959 encountered: HARegion.putGIIDataInRegion found null eventId in {}",
                  regionName, val);
            }
          }
        }
        tailKey.set(max);
      } finally {
        puttingGIIDataInQueue.set(false);
        positionAfterGII = tailKey.get();
        if (positionAfterGII > 0) {
          positionBeforeGII = 1;
        }
        doneGIIQueueing.set(true);
        doneGIIQueueingTime = System.currentTimeMillis();
        if (isDebugEnabled) {
          logger.debug("{} done putting GII data into queue", this);
        }
      }
    }
    // TODO:Asif: Avoid invocation of this method
    startHAServices(region.getCache());
  }
Repopulates the HARegion after the GII is over so as to reset the counters and populate the
DACE objects for the thread identifiers . This method should be invoked as the last method in
the constructor . Thus while creating BlockingQueue this method should be invoked lastly in the
derived class constructor , after the HARegionQueue contructor is complete. Otherwise, the
ReentrantLock will be null.
geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java