@Override
  protected void setFlags(short flags, DataInput in,
      DeserializationContext context) throws IOException, ClassNotFoundException {
    super.setFlags(flags, in, context);
    ifNew = (flags & IF_NEW) != 0;
    ifOld = (flags & IF_OLD) != 0;
    requireOldValue = (flags & REQUIRED_OLD_VAL) != 0;
    hasOldValue = (flags & HAS_OLD_VAL) != 0;
    useOriginRemote = (flags & USE_ORIGIN_REMOTE) != 0;
  }
sets the instance variable hasOldValue to the giving boolean value.
geode-core/src/main/java/org/apache/geode/internal/cache/tx/RemotePutMessage.java