public byte[] getSerializedValue() {
    if (newValueBytes == null) {
      final Object val;
      val = basicGetNewValue();
      if (val instanceof byte[]) {
        return (byte[]) val;
      } else if (val instanceof CachedDeserializable) {
        return ((CachedDeserializable) val).getSerializedValue();
      }
      try {
        return CacheServerHelper.serialize(val);
      } catch (IOException ioe) {
        throw new GemFireIOException("unexpected exception", ioe);
      }
    } else {
      return newValueBytes;
    }
  }
If the old value is stored off-heap return a retained OFF_HEAP_REFERENCE (caller must release).

@return a retained OFF_HEAP_REFERENCE if the old value is off-heap; otherwise returns null
geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java