public static void oldValueToData(DataOutput out, Object ov, boolean ovIsSerialized)
        throws IOException {
      if (ovIsSerialized && ov != null) {
        byte[] oldValueBytes;
        if (ov instanceof byte[]) {
          oldValueBytes = (byte[]) ov;
          DataSerializer.writeObject(new VMCachedDeserializable(oldValueBytes), out);
        } else if (ov instanceof CachedDeserializable) {
          if (ov instanceof StoredObject) {
            ((StoredObject) ov).sendAsCachedDeserializable(out);
          } else {
            DataSerializer.writeObject(ov, out);
          }
        } else {
          oldValueBytes = EntryEventImpl.serialize(ov);
          DataSerializer.writeObject(new VMCachedDeserializable(oldValueBytes), out);
        }
      } else {
        DataSerializer.writeObject(ov, out);
      }

    }
Return oldValue as a byte[] or as a CachedDeserializable. This method used to deserialize a
CachedDeserializable but that is too soon. This method is called during message processing.
The deserialization needs to be deferred until we get back to the application thread which
happens for this oldValue when they call EntryEventImpl.getOldValue.
geode-core/src/main/java/org/apache/geode/internal/cache/tx/RemotePutMessage.java