Пример #1
0
    public int size() {
      int retval = Global.BYTE_SIZE * 2; // type + merge_rejected

      retval += Global.BYTE_SIZE; // presence view
      retval += Global.BYTE_SIZE; // MergeView or View
      if (view != null) retval += view.serializedSize();

      retval += Util.size(mbr);

      retval += Util.size(mbrs);

      retval += Global.BYTE_SIZE; // presence of join_rsp
      if (join_rsp != null) retval += join_rsp.serializedSize();

      retval += Global.BYTE_SIZE; // presence for my_digest
      if (my_digest != null) retval += my_digest.serializedSize();

      retval += Global.BYTE_SIZE; // presence for merge_id
      if (merge_id != null) retval += merge_id.size();

      retval += Global.BYTE_SIZE; // boolean useFlushIfPresent
      return retval;
    }