private <R> R callWithOffHeapLock(Function<CachedDeserializable, R> function) {
      if (event != null) {
        // this call does not use getCd() to access this.cd
        // because the check for offHeapOk is done by event.callWithOffHeapLock
        return event.callWithOffHeapLock(cd, function);
      } else {
        return function.apply(getCd());
      }
    }
The only methods that need to use this method are those on the external SerializedCacheValue
interface and any other method that a customer could call that may access the off-heap
values. For example if toString was implemented on this class to access the value then it
would need to use this method.
geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java