@Override
  public Object getDeserializedValue() {
    if (valueIsObject == 0x00) {
      Object result = value;
      if (result == null) {
        @Unretained(OffHeapIdentifier.GATEWAY_SENDER_EVENT_IMPL_VALUE)
        Object so = valueObj;
        if (valueObjReleased) {
          throw new IllegalStateException(
              "Value is no longer available. getDeserializedValue must be called before processEvents returns.");
        }
        if (so instanceof StoredObject) {
          return ((StoredObject) so).getValueAsDeserializedHeapObject();
        } else {
          throw new IllegalStateException(
              "expected valueObj field to be an instance of StoredObject but it was " + so);
        }
      }
      return result;
    } else {
      Object vo = valueObj;
      if (vo != null) {
        if (vo instanceof StoredObject) {
          @Unretained(OffHeapIdentifier.GATEWAY_SENDER_EVENT_IMPL_VALUE)
          StoredObject so = (StoredObject) vo;
          return so.getValueAsDeserializedHeapObject();
        } else {
          return vo; // it is already deserialized
        }
      } else {
        if (value != null) {
          Object result = EntryEventImpl.deserialize(value);
          valueObj = result;
          return result;
        } else if (substituteValue != null) {
          // If the substitute value is set, return it.
          return substituteValue;
        } else {
          if (valueObjReleased) {
            throw new IllegalStateException(
                "Value is no longer available. getDeserializedValue must be called before processEvents returns.");
          }
          // both value and valueObj are null but we did not free it.
          return null;
        }
      }
    }
  }
Return this event's deserialized value

@return this event's deserialized value
geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventImpl.java