@Override
  public String toString() {
    StringBuilder buf = new StringBuilder();
    buf.append(getShortClassName());
    buf.append("[");

    buf.append("op=");
    buf.append(getOperation());
    buf.append(";region=");
    buf.append(getRegion().getFullPath());
    buf.append(";key=");
    buf.append(getKey());
    if (Boolean.getBoolean("gemfire.insecure-logvalues")) {
      buf.append(";oldValue=");
      if (mayHaveOffHeapReferences()) {
        synchronized (offHeapLock) {
          try {
            ArrayUtils.objectStringNonRecursive(basicGetOldValue(), buf);
          } catch (IllegalStateException ignore) {
            buf.append("OFFHEAP_VALUE_FREED");
          }
        }
      } else {
        ArrayUtils.objectStringNonRecursive(basicGetOldValue(), buf);
      }

      buf.append(";newValue=");
      if (mayHaveOffHeapReferences()) {
        synchronized (offHeapLock) {
          try {
            ArrayUtils.objectStringNonRecursive(basicGetNewValue(), buf);
          } catch (IllegalStateException ignore) {
            buf.append("OFFHEAP_VALUE_FREED");
          }
        }
      } else {
        ArrayUtils.objectStringNonRecursive(basicGetNewValue(), buf);
      }
    }
    buf.append(";callbackArg=");
    buf.append(getRawCallbackArgument());
    buf.append(";originRemote=");
    buf.append(isOriginRemote());
    buf.append(";originMember=");
    buf.append(getDistributedMember());
    if (isPossibleDuplicate()) {
      buf.append(";posDup");
    }
    if (callbacksInvoked()) {
      buf.append(";callbacksInvoked");
    }
    if (inhibitCacheListenerNotification()) {
      buf.append(";inhibitCacheListenerNotification");
    }
    if (versionTag != null) {
      buf.append(";version=").append(versionTag);
    }
    if (getContext() != null) {
      buf.append(";context=");
      buf.append(getContext());
    }
    if (eventID != null) {
      buf.append(";id=");
      buf.append(eventID);
    }
    if (deltaBytes != null) {
      buf.append(";[").append(deltaBytes.length).append(" deltaBytes]");
    }
    if (filterInfo != null) {
      buf.append(";routing=");
      buf.append(filterInfo);
    }
    if (isFromServer()) {
      buf.append(";isFromServer");
    }
    if (isConcurrencyConflict()) {
      buf.append(";isInConflict");
    }
    if (getInhibitDistribution()) {
      buf.append(";inhibitDistribution");
    }
    if (tailKey != -1) {
      buf.append(";tailKey=").append(tailKey);
    }
    buf.append("]");
    return buf.toString();
  }
Serialize an object into a <code>byte[]</code> . If the byte array provided by the wrapper is
sufficient to hold the data, it is used otherwise a new byte array gets created & its reference
is stored in the wrapper. The User Bit is also appropriately set as Serialized

@param wrapper Object of type BytesAndBitsForCompactor which is used to fetch the serialized
       data. The byte array of the wrapper is used if possible else a the new byte array
       containing the data is set in the wrapper.
@throws IllegalArgumentException If <code>obj</code> should not be serialized
geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java