@Override
  public Iterator<Object> getDestroyedEntries() {
    // assert if ri then writeLock held
    // assert if gii then lock held
    Iterator<Object> result = destroyedEntryKeys.keySet().iterator();
    destroyedEntryKeys = new ConcurrentHashMap<>();
    return result;
  }
Using CM as a Set of keys
geode-core/src/main/java/org/apache/geode/internal/cache/UnsharedImageState.java