Esempio n. 1
0
 @Override
 public int size() {
   return (int)
       (Global.BYTE_SIZE
           + messageID.serializedSize()
           + Bits.size(sequencerNumber)
           + Util.size(destinations));
 }
Esempio n. 2
0
 public final int size() {
   int retval = Global.BYTE_SIZE; // type
   switch (type) {
     case DATA:
       retval +=
           Bits.size(seqno) // seqno
               + Global.SHORT_SIZE // conn_id
               + Global.BYTE_SIZE; // first
       break;
     case ACK:
       retval += Bits.size(seqno) + Global.SHORT_SIZE; // conn_id
       break;
     case SEND_FIRST_SEQNO:
       retval += Bits.size(seqno);
       break;
   }
   return retval;
 }
Esempio n. 3
0
 public int size() {
   return Global.BYTE_SIZE + Bits.size(seqno) + Global.BYTE_SIZE; // type + seqno + flush_ack
 }