@Override
  public Object getKey() {
    int keyLength = getKeyLength();
    char[] chars = new char[keyLength];
    long tempBits1 = bits1;
    if (getEncoding() == 1) {
      for (int i = 0; i < keyLength; i++) {
        tempBits1 >>= 8;
        chars[i] = (char) (tempBits1 & 0x00ff);
      }
    } else {
      for (int i = 0; i < keyLength; i++) {
        tempBits1 >>= 16;
        chars[i] = (char) (tempBits1 & 0x00FFff);
      }
    }
    return new String(chars);
  }
I needed to add this because I wanted clear to call setValue which normally can only be called
while the re is synced. But if I sync in that code it causes a lock ordering deadlock with the
disk regions because they also get a rw lock in clear. Some hardware platforms do not support
CAS on a long. If gemfire is run on one of those the AtomicLongFieldUpdater does a sync on the
RegionEntry and we will once again be deadlocked. I don't know if we support any of the
hardware platforms that do not have a 64bit CAS. If we do then we can expect deadlocks on disk
regions.
geode-core/src/main/java/org/apache/geode/internal/cache/entries/VMThinLRURegionEntryOffHeapStringKey1.java