~raghavendra-prabhu/percona-xtradb-cluster/release-5.5.30-galera-2.x

« back to all changes in this revision

Viewing changes to gcomm/src/evs_message2.hpp

  • Committer: Raghavendra D Prabhu
  • Date: 2013-04-12 15:26:34 UTC
  • mfrom: (95.2.24 2.x)
  • Revision ID: raghavendra.prabhu@percona.com-20130412152634-2y2u0swshf5fie2x
Merge lp:galera-2.x upto revision 150.

Following bugs are fixed:

lp:1166065
lp:1164992

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
                im_range_    == cmp.im_range_);
89
89
    }
90
90
 
91
 
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
92
 
        throw(gu::Exception);
93
 
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset)
94
 
        throw(gu::Exception);
 
91
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const;
 
92
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset);
95
93
    static size_t serial_size();
96
94
private:
97
95
    enum
131
129
 
132
130
 
133
131
    static const uint8_t F_MSG_MORE = 0x1; /*!< Sender has more messages to send  */
134
 
    static const uint8_t F_RETRANS   = 0x2; /*!< Message is resent upon request    */
 
132
    static const uint8_t F_RETRANS  = 0x2; /*!< Message is resent upon request    */
135
133
 
136
134
    /*!
137
135
     * @brief Message source has been set explicitly via set_source()
138
136
     */
139
137
    static const uint8_t F_SOURCE   = 0x4;
140
138
 
141
 
    static const uint8_t F_AGGREGATE = 0x8; /*!< Message contains aggregated payload */
142
 
    static const uint8_t F_COMMIT    = 0x10;
143
 
    static const uint8_t F_BC        = 0x20; /*!< Message was sent in backward compatibility mode */
 
139
    static const uint8_t F_AGGREGATE= 0x8; /*!< Message contains aggregated payload */
 
140
    static const uint8_t F_COMMIT   = 0x10;
 
141
    static const uint8_t F_BC       = 0x20;/*!< Message was sent in backward compatibility mode */
144
142
    /*!
145
143
     * Get version of the message
146
144
     *
270
268
     */
271
269
    gu::datetime::Date tstamp() const { return tstamp_; }
272
270
 
273
 
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset)
274
 
        throw(gu::Exception);
 
271
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset);
275
272
 
276
273
    bool operator==(const Message& cmp) const;
277
274
 
358
355
 
359
356
protected:
360
357
 
361
 
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
362
 
        throw(gu::Exception);
 
358
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const;
363
359
 
364
360
    size_t serial_size() const;
365
361
 
417
413
 
418
414
    void set_aru_seq(const seqno_t as) { aru_seq_ = as; }
419
415
 
420
 
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
421
 
        throw(gu::Exception);
 
416
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const;
422
417
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset,
423
 
                       bool skip_header = false)
424
 
        throw(gu::Exception);
 
418
                       bool skip_header = false);
425
419
    size_t serial_size() const;
426
420
 
427
421
};
443
437
    size_t len()   const { return len_;   }
444
438
    uint8_t user_type() const { return user_type_; }
445
439
 
446
 
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
447
 
        throw(gu::Exception);
448
 
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset)
449
 
        throw(gu::Exception);
 
440
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const;
 
441
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset);
450
442
    size_t serial_size() const;
451
443
    bool operator==(const AggregateMessage& cmp) const
452
444
    {
481
473
                O_UNRELIABLE,
482
474
                fifo_seq)
483
475
    { }
484
 
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
485
 
        throw(gu::Exception);
 
476
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const;
486
477
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset,
487
 
                       bool skip_header = false)
488
 
        throw(gu::Exception);
 
478
                       bool skip_header = false);
489
479
    size_t serial_size() const;
490
480
};
491
481
 
516
506
                range_uuid,
517
507
                range)
518
508
    { }
519
 
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
520
 
        throw(gu::Exception);
 
509
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const;
521
510
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset,
522
 
                       bool skip_header = false)
523
 
        throw(gu::Exception);
 
511
                       bool skip_header = false);
524
512
    size_t serial_size() const;
525
513
};
526
514
 
550
538
                Range(),
551
539
                node_list)
552
540
    { }
553
 
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
554
 
        throw(gu::Exception);
 
541
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const;
555
542
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset,
556
 
                       bool skip_header = false)
557
 
        throw(gu::Exception);
 
543
                       bool skip_header = false);
558
544
    size_t serial_size() const;
559
545
};
560
546
 
585
571
                Range(),
586
572
                node_list)
587
573
    { }
588
 
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
589
 
        throw(gu::Exception);
 
574
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const;
590
575
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset,
591
 
                       bool skip_header = false)
592
 
        throw(gu::Exception);
 
576
                       bool skip_header = false);
593
577
    size_t serial_size() const;
594
578
};
595
579
 
616
600
                aru_seq,
617
601
                flags)
618
602
    { }
619
 
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
620
 
        throw(gu::Exception);
 
603
    size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const;
621
604
    size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset,
622
 
                       bool skip_header = false)
623
 
        throw(gu::Exception);
 
605
                       bool skip_header = false);
624
606
    size_t serial_size() const;
625
607
};
626
608