@Override
  protected short computeCompressedShort() {
    short s = super.computeCompressedShort();
    if (ifNew) {
      s |= IF_NEW;
    }
    if (ifOld) {
      s |= IF_OLD;
    }
    if (requireOldValue) {
      s |= REQUIRED_OLD_VAL;
    }
    if (hasOldValue) {
      s |= HAS_OLD_VAL;
    }
    if (event.getDeltaBytes() != null) {
      s |= HAS_DELTA_BYTES;
    }
    if (expectedOldValue != null) {
      s |= HAS_EXPECTED_OLD_VAL;
    }
    if (useOriginRemote) {
      s |= USE_ORIGIN_REMOTE;
    }
    if (possibleDuplicate) {
      s |= POS_DUP;
    }
    return s;
  }
sets the instance variable hasOldValue to the giving boolean value.
geode-core/src/main/java/org/apache/geode/internal/cache/tx/RemotePutMessage.java