private List/* <TXEntryStateWithRegionAndKey> */ getSortedEntries() {
    ArrayList/* <TXEntryStateWithRegionAndKey> */ entries = new ArrayList();
    for (final Map.Entry<InternalRegion, TXRegionState> internalRegionTXRegionStateEntry : regions
        .entrySet()) {
      InternalRegion r = (InternalRegion) ((Map.Entry) internalRegionTXRegionStateEntry).getKey();
      TXRegionState txrs =
          (TXRegionState) ((Map.Entry) internalRegionTXRegionStateEntry).getValue();
      txrs.getEntries(entries, r);
    }
    if (entries.isEmpty()) {
      return Collections.EMPTY_LIST;
    } else {
      Collections.sort(entries);
      return entries;
    }
  }
Note that cleanup does more than is needed in this method. This method only needs to do stuff
that is required when a Cache close is done and we have txs that are still in progress.
Currently the only thing that is needed is to decrement off-heap refcounts since off-heap
memory lives after a cache close.
geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java