@Retained
  public Object _getValueRetain(@Retained @Unretained OffHeapRegionEntry regionEntry,
      boolean decompress, RegionEntryContext context) {
    int retryCount = 0;

    @Retained
    long address = regionEntry.getAddress();

    while (isOffHeap(address)) {
      if (referenceCounter.retain(address)) {
        @Unretained
        long address2 = regionEntry.getAddress();
        if (address != address2) {
          retryCount = 0;
          referenceCounter.release(address);
          // spin around and try again.
          address = address2;
        } else {
          return addressToObject(address, decompress, context);
        }
      } else {
        // spin around and try again
        long address2 = regionEntry.getAddress();
        retryCount++;
        if (retryCount > 100) {
          throw new IllegalStateException("retain failed address=" + address + " addr2=" + address
              + " 100 times" + " history=" + ReferenceCountHelper.getFreeRefCountInfo(address));
        }
        address = address2;
        // Since retain returned false our region entry should have a different value in it. However
        // the actual address could be the exact same one because address was released, then
        // reallocated from the free list and set back into this region entry.
      }
    }
    return addressToObject(address, decompress, context);
  }
If the value stored at the location held in 're' is returned, then it will be Retained. If the
value returned is 're' decompressed into another off-heap location, then 're' will be
Unretained but the new, decompressed value will be Retained. Therefore, whichever is returned
(the value at the address in 're' or the decompressed value) it will have been Retained.

@return possible OFF_HEAP_OBJECT (caller must release)
geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapRegionEntryHelperInstance.java