private void checkSetForConflict(TXRegionLockRequestImpl rr, Map<Object, Boolean> oldValue,
      Map<Object, Boolean> keys, IdentityArrayList localLocks) throws CommitConflictException {
    for (Map.Entry<Object, Boolean> e : keys.entrySet()) {
      if (oldValue.containsKey(e.getKey())) {
        if (oldValue.get(e.getKey()) || e.getValue()) {
          release(localLocks, true);
          throw new CommitConflictException(
              String.format(
                  "The key %s in region %s was being modified by another transaction locally.",
                  e.getKey(), rr.getRegionFullPath()));
        }
      }
    }
  }
keys are LocalRegion; values are ArrayList of Sets of held locks.
geode-core/src/main/java/org/apache/geode/internal/cache/TXReservationMgr.java