public final int size() { int retval = Global.BYTE_SIZE; // type switch (type) { case DATA: retval += Util.size(seqno) // seqno + Global.SHORT_SIZE // conn_id + Global.BYTE_SIZE; // first break; case ACK: retval += Util.size(seqno) + Global.SHORT_SIZE; // conn_id break; case SEND_FIRST_SEQNO: retval += Util.size(seqno); break; } return retval; }
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; }
public int size() { return Util.size(fork_stack_id) + Util.size(fork_channel_id); }